We are using the docker image in order to deploy our tryton servers (5.0 version) but we have some strange issues after some time running. The issue is that a RecursionError: maximum recursion depth exceeded while calling a Python object is raised on the uwsgi server on some random intervals.
The recursion error is a repetition of the following traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/trytond/model/model.py", line 393, in __getattr__
return super(ModelStorage, self).__getattr__(name)
File "/usr/local/lib/python3.5/dist-packages/trytond/model/model.py", line 396, in __getattr__
return self._values[name]
TypeError: 'NoneType' object is not subscriptable
% (self.__name__, name, self._values))
AttributeError: 'ir.session' Model has no attribute 'None': None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
During handling of the above exception, another exception occurred:
File "/usr/local/lib/python3.5/dist-packages/trytond/model/model.py", line 393, in __getattr__
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/trytond/model/modelstorage.py", line 1227, in __getattr__
return self._values[name]
TypeError: 'NoneType' object is not subscriptable
The strange think is that after this exceptions the uwsgi workers are killed with the following message:
Tue Nov 13 16:13:19 2018 - worker 1 (pid: 25) is taking too much time to die...NO MERCY !!!
worker 1 killed successfully (pid: 25)
uWSGI worker 1 cheaped.
Tue Nov 13 16:13:36 2018 - worker 2 (pid: 33) is taking too much time to die...NO MERCY !!!
worker 2 killed successfully (pid: 33)
uWSGI worker 2 cheaped.
Tue Nov 13 16:13:39 2018 - worker 3 (pid: 41) is taking too much time to die...NO MERCY !!!
worker 3 killed successfully (pid: 41)
uWSGI worker 3 cheaped.
And then everything works as expected as the workers are restarted. On customer side, this results as a 502 Bad Gateway Error (as we use nginx in front of the uwsgi server) for some time and when the workers are restarted everything is working as expected.
Here is the uwsgi log from the start to the server to when the issue is first shown.
I haven’t been able to found some procedure to reproduce the issue.
Have anyone found some similar behavior? Any idea on how to solve it or how to produce a scenario to reproduce it will be much apreciated.