Skip to content
Snippets Groups Projects
Commit e3f9c5f8 authored by Chris Hines's avatar Chris Hines
Browse files

fix up logging, increase idel websockets out to 5 minutes

parent ecdf690a
No related branches found
No related tags found
2 merge requests!90I think there is a problem with multiple threads creating multiple sessions...,!88Dev
Pipeline #56734 passed
......@@ -5,6 +5,9 @@ location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
client_max_body_size 50M;
......
......@@ -171,8 +171,6 @@ class TWSProxy(threading.Thread):
if msglength > 0:
TWSProxy.reliablesend(dest,buff,msglength)
if msglength == 0:
logger.debug('socket shutdown, fh ready to read but 0 bytes returned')
logger.debug('{} {}'.format(r,src))
#dest.send(buff)
dest.shutdown(shuttype)
initshutdown.set()
......@@ -192,7 +190,7 @@ def mainserver(port=None):
logger = logging.getLogger()
handler = TimedRotatingFileHandler(filename="/var/log/strudel2/tws.log",when='h',interval=24,backupCount=7)
formatter = logging.Formatter("%(asctime)s %(levelname)s:%(process)s: %(message)s")
handler.setFormattter(formatter)
handler.setFormatter(formatter)
logger.addHandler(handler)
except Exception as e:
import traceback
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment