Timeout when sync'ing 700+ messages on heroku and not locally
Log:
'''
at=error code=H12 desc="Request timeout" method=GET path="/chat/" host=peaceful-sea-58238.herokuapp.com request_id=34dbf6e6-1572-4599-8a1a-601d00582329 fwd="" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
'''
I think this might be something to do with gunicorn's worker timeout, but I upped it already to higher than 30seconds in the command line:
web: gunicorn pymatrix_client.wsgi --timeout 120 --log-file -
Will have to investigate further.
Local testing will not catch this, so need to see if I can get tests running on server with deployment.
Sometimes the matrix server is under load, will have to find a more graceful way to fail
Lower the placeholder default value of messages for login sync
Add a message about the matrix server load and high number of messages could be an issue.
Resolved:
Fixed a couple of issues with login: always joining when logging in to room, stopped calling api with an empty token, it was sometimes failing here when token = "", it needs to be None or a string
Not resolved:
Sync'ing 700+ messages in a single REST is a bit much, will leave it possible, but might put an info box on the login with lower default.
This won't be fixed fully without some js ajax magic.
Timeout when sync'ing 700+ messages on heroku and not locally Log: ''' at=error code=H12 desc="Request timeout" method=GET path="/chat/" host=peaceful-sea-58238.herokuapp.com request_id=34dbf6e6-1572-4599-8a1a-601d00582329 fwd="" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https ''' I think this might be something to do with gunicorn's worker timeout, but I upped it already to higher than 30seconds in the command line: web: gunicorn pymatrix_client.wsgi --timeout 120 --log-file -
Will have to investigate further. Local testing will not catch this, so need to see if I can get tests running on server with deployment.