Commit 3a9cf4a4 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

log added

parent ec413c8f
[2020-06-10 17:46:11,097] INFO in __init__: loading views
[2020-06-10 17:48:13,702] INFO in __init__: loading views
[2020-06-10 17:48:32,080] WARNING in __init__: loading views
from flask import Flask from flask import Flask
from flask_mail import Mail from flask_mail import Mail
import app.helpers.log
# app initialization
app = Flask(__name__) app = Flask(__name__)
# config loading
if app.config['ENV'] == 'production': if app.config['ENV'] == 'production':
app.config.from_object('config.ProductionConfig') app.config.from_object('config.ProductionConfig')
else: else:
app.config.from_object('config.DevelopmentConfig') app.config.from_object('config.DevelopmentConfig')
# mailer initialization
mail = Mail(app) mail = Mail(app)
# load views and notification manager
from app import views from app import views
from app import views_admin from app import views_admin
# No need anymore in maintainer since # No need anymore in maintainer since
......
from logging.config import dictConfig
dictConfig({
'version' : 1,
'formatters' : { 'default' : {
'format' : '[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
}},
'handlers' : { 'wsgi' : {
'class' : 'logging.handlers.RotatingFileHandler',
'filename' : 'app.log',
'maxBytes' : 1048576, # 1Mb
'backupCount': 1,
'formatter' : 'default',
'level': 'INFO'
}},
'loggers' : { 'file' : {
'level' : 'INFO',
'handlers' : ['wsgi']
}},
'root' : {
'level' : 'INFO',
'handlers' : ['wsgi']
}
})
...@@ -22,6 +22,7 @@ import app.helpers.decorators as decorators ...@@ -22,6 +22,7 @@ import app.helpers.decorators as decorators
import os import os
import binascii import binascii
import logging
MAX_PG = 5 MAX_PG = 5
MAX_PG_ENTRIES_USERS = 10 MAX_PG_ENTRIES_USERS = 10
...@@ -64,6 +65,7 @@ def register(): ...@@ -64,6 +65,7 @@ def register():
else: else:
session['name'] = username session['name'] = username
session['role'] = 'user' session['role'] = 'user'
return redirect(url_for('index')) return redirect(url_for('index'))
else: else:
return redirect(url_for('login')) return redirect(url_for('login'))
......
[uWSGI] getting INI configuration from server.ini
*** Starting uWSGI 2.0.18 (32bit) on [Tue Apr 21 12:24:28 2020] ***
compiled with version: 6.3.0 20170516 on 20 April 2020 09:27:17
os: Linux-4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019
nodename: LoRaIk
machine: armv7l
clock source: unix
detected number of CPU cores: 4
current working directory: /home/pi/thso.server/app
detected binary path: /home/pi/thso.server/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 6924
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8080 fd 4
uwsgi socket 0 bound to TCP address 127.0.0.1:36961 (port auto-assigned) fd 3
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Python main interpreter initialized at 0x3a8038
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 261216 bytes (255 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x3a8038 pid: 11600 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 11600)
spawned uWSGI worker 1 (pid: 11613, cores: 4)
spawned uWSGI worker 2 (pid: 11614, cores: 4)
spawned uWSGI http 1 (pid: 11618)
SIGINT/SIGQUIT received...killing workers...
gateway "uWSGI http 1" has been buried (pid: 11618)
worker 1 buried after 1 seconds
worker 2 buried after 1 seconds
goodbye to uWSGI.
[uWSGI] getting INI configuration from server.ini
*** Starting uWSGI 2.0.18 (32bit) on [Tue Apr 21 12:24:40 2020] ***
compiled with version: 6.3.0 20170516 on 20 April 2020 09:27:17
os: Linux-4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019
nodename: LoRaIk
machine: armv7l
clock source: unix
detected number of CPU cores: 4
current working directory: /home/pi/thso.server/app
detected binary path: /home/pi/thso.server/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 6924
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8080 fd 4
uwsgi socket 0 bound to TCP address 127.0.0.1:41041 (port auto-assigned) fd 3
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Python main interpreter initialized at 0x6ec038
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 261216 bytes (255 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x6ec038 pid: 11658 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 11658)
spawned uWSGI worker 1 (pid: 11682, cores: 4)
spawned uWSGI worker 2 (pid: 11683, cores: 4)
spawned uWSGI http 1 (pid: 11688)
[pid: 11683|app: 0|req: 1/1] 192.168.0.106 () {42 vars in 782 bytes} [Tue Apr 21 12:24:55 2020] GET / => generated 2110 bytes in 238 msecs (HTTP/1.1 200) 4 headers in 234 bytes (1 switches on core 0)
[pid: 11682|app: 0|req: 1/2] 192.168.0.106 () {42 vars in 787 bytes} [Tue Apr 21 12:24:57 2020] GET /app?appkey=e6736c46 => generated 2814 bytes in 275 msecs (HTTP/1.1 200) 4 headers in 258 bytes (1 switches on core 0)
[pid: 11682|app: 0|req: 2/3] 192.168.0.106 () {42 vars in 808 bytes} [Tue Apr 21 12:24:59 2020] GET /dev?id=1 => generated 2871 bytes in 187 msecs (HTTP/1.1 200) 4 headers in 258 bytes (1 switches on core 2)
[pid: 11683|app: 0|req: 2/4] 192.168.0.106 () {42 vars in 798 bytes} [Tue Apr 21 12:25:03 2020] GET /dev-data => generated 13680 bytes in 200 msecs (HTTP/1.1 200) 3 headers in 96 bytes (1 switches on core 1)
[pid: 11683|app: 0|req: 3/5] 192.168.0.106 () {42 vars in 780 bytes} [Tue Apr 21 12:25:26 2020] GET / => generated 2110 bytes in 116 msecs (HTTP/1.1 200) 4 headers in 234 bytes (1 switches on core 2)
[pid: 11683|app: 0|req: 4/6] 192.168.0.106 () {40 vars in 708 bytes} [Tue Apr 21 16:10:59 2020] GET / => generated 2110 bytes in 101 msecs (HTTP/1.1 200) 3 headers in 95 bytes (1 switches on core 3)
[pid: 11683|app: 0|req: 5/7] 192.168.0.106 () {42 vars in 787 bytes} [Tue Apr 21 16:11:02 2020] GET /app?appkey=e6736c46 => generated 2814 bytes in 193 msecs (HTTP/1.1 200) 4 headers in 258 bytes (1 switches on core 0)
[pid: 11683|app: 0|req: 6/8] 192.168.0.106 () {42 vars in 808 bytes} [Tue Apr 21 16:11:04 2020] GET /dev?id=1 => generated 2870 bytes in 177 msecs (HTTP/1.1 200) 4 headers in 258 bytes (1 switches on core 1)
[pid: 11683|app: 0|req: 7/9] 192.168.0.106 () {42 vars in 798 bytes} [Tue Apr 21 16:11:11 2020] GET /dev-data => generated 13674 bytes in 183 msecs (HTTP/1.1 200) 3 headers in 96 bytes (1 switches on core 2)
[pid: 11682|app: 0|req: 3/10] 192.168.0.106 () {42 vars in 782 bytes} [Tue Apr 21 16:11:26 2020] GET / => generated 2110 bytes in 146 msecs (HTTP/1.1 200) 4 headers in 234 bytes (1 switches on core 1)
gateway "uWSGI http 1" has been buried (pid: 11688)
...brutally killing workers...
worker 1 buried after 1 seconds
worker 2 buried after 1 seconds
binary reloading uWSGI...
chdir() to /home/pi/thso.server/app
closing all non-uwsgi socket fds > 2 (max_fd = 1024)...
found fd 3 mapped to socket 0 (127.0.0.1:41041)
running /home/pi/thso.server/env/bin/uwsgi
[uWSGI] getting INI configuration from server.ini
*** Starting uWSGI 2.0.18 (32bit) on [Wed Apr 22 12:12:44 2020] ***
compiled with version: 6.3.0 20170516 on 20 April 2020 09:27:17
os: Linux-4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019
nodename: LoRaIk
machine: armv7l
clock source: unix
detected number of CPU cores: 4
current working directory: /home/pi/thso.server/app
detected binary path: /home/pi/thso.server/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 6924
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8080 fd 5
uwsgi socket 0 bound to TCP address 127.0.0.1:38741 (port auto-assigned) fd 4
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Python main interpreter initialized at 0x1de8f78
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 261216 bytes (255 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
File "./app/__init__.py", line 11, in <module>
from app import views
File "./app/views.py", line 6, in <module>
import app.dao.user.user as ud
File "./app/dao/user/user.py", line 1, in <module>
from app.helpers.misc import with_psql
File "./app/helpers/misc.py", line 5, in <module>
from app.dao.pend import delete_all_ack
ImportError: cannot import name 'delete_all_ack'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
gracefully (RE)spawned uWSGI master process (pid: 11658)
spawned uWSGI worker 1 (pid: 13464, cores: 4)
spawned uWSGI worker 2 (pid: 13465, cores: 4)
spawned uWSGI http 1 (pid: 13469)
gateway "uWSGI http 1" has been buried (pid: 13469)
...brutally killing workers...
worker 1 buried after 0 seconds
worker 2 buried after 0 seconds
binary reloading uWSGI...
chdir() to /home/pi/thso.server/app
closing all non-uwsgi socket fds > 2 (max_fd = 1024)...
found fd 4 mapped to socket 0 (127.0.0.1:38741)
running /home/pi/thso.server/env/bin/uwsgi
[uWSGI] getting INI configuration from server.ini
*** Starting uWSGI 2.0.18 (32bit) on [Wed Apr 22 12:12:58 2020] ***
compiled with version: 6.3.0 20170516 on 20 April 2020 09:27:17
os: Linux-4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019
nodename: LoRaIk
machine: armv7l
clock source: unix
detected number of CPU cores: 4
current working directory: /home/pi/thso.server/app
detected binary path: /home/pi/thso.server/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 6924
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8080 fd 5
uwsgi socket 0 bound to TCP address 127.0.0.1:35833 (port auto-assigned) fd 3
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Python main interpreter initialized at 0x1598f78
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 261216 bytes (255 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
File "./app/__init__.py", line 11, in <module>
from app import views
File "./app/views.py", line 6, in <module>
import app.dao.user.user as ud
File "./app/dao/user/user.py", line 1, in <module>
from app.helpers.misc import with_psql
File "./app/helpers/misc.py", line 5, in <module>
from app.dao.pend import delete_all_ack
ImportError: cannot import name 'delete_all_ack'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
gracefully (RE)spawned uWSGI master process (pid: 11658)
spawned uWSGI worker 1 (pid: 13545, cores: 4)
spawned uWSGI worker 2 (pid: 13546, cores: 4)
spawned uWSGI http 1 (pid: 13550)
gateway "uWSGI http 1" has been buried (pid: 13550)
...brutally killing workers...
worker 1 buried after 1 seconds
worker 2 buried after 1 seconds
binary reloading uWSGI...
chdir() to /home/pi/thso.server/app
closing all non-uwsgi socket fds > 2 (max_fd = 1024)...
found fd 3 mapped to socket 0 (127.0.0.1:35833)
running /home/pi/thso.server/env/bin/uwsgi
[uWSGI] getting INI configuration from server.ini
*** Starting uWSGI 2.0.18 (32bit) on [Wed Apr 22 12:13:01 2020] ***
compiled with version: 6.3.0 20170516 on 20 April 2020 09:27:17
os: Linux-4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019
nodename: LoRaIk
machine: armv7l
clock source: unix
detected number of CPU cores: 4
current working directory: /home/pi/thso.server/app
detected binary path: /home/pi/thso.server/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 6924
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8080 fd 5
uwsgi socket 0 bound to TCP address 127.0.0.1:34889 (port auto-assigned) fd 4
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Python main interpreter initialized at 0x150bf78
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 261216 bytes (255 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
File "./app/__init__.py", line 11, in <module>
from app import views
File "./app/views.py", line 6, in <module>
import app.dao.user.user as ud
File "./app/dao/user/user.py", line 1, in <module>
from app.helpers.misc import with_psql
File "./app/helpers/misc.py", line 5, in <module>
from app.dao.pend import delete_all_ack
ImportError: cannot import name 'delete_all_ack'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
gracefully (RE)spawned uWSGI master process (pid: 11658)
spawned uWSGI worker 1 (pid: 13558, cores: 4)
spawned uWSGI worker 2 (pid: 13559, cores: 4)
spawned uWSGI http 1 (pid: 13563)
Wed Apr 22 12:13:46 2020 - uWSGI worker 1 screams: UAAAAAAH my master disconnected: i will kill myself !!!
Wed Apr 22 12:13:46 2020 - uWSGI worker 1 screams: UAAAAAAH my master disconnected: i will kill myself !!!
Wed Apr 22 12:13:46 2020 - uWSGI worker 2 screams: UAAAAAAH my master disconnected: i will kill myself !!!
Wed Apr 22 12:13:46 2020 - uWSGI worker 2 screams: UAAAAAAH my master disconnected: i will kill myself !!!
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment