Ticket #43 (closed Defect: To be investigated)

Opened 8 months ago

Last modified 2 months ago

500 after along time runing

Reported by: goyo.villalba Owned by: mircea
Priority: Major Milestone:
Component: Transport Version: Release 1.0
Severity: Critical Keywords:
Cc:

Description

Hi,

I am using openXcap 0.9.9 with openSer 1.3 for presence rules and resource list. The problem happens if I leave both servers running the whole night. Then the first HTTP request to openXCAP in the morning fails, I get a 500 from the server. If I restart openXcap (no need to restart openSer) the same request works. I have not been able to find any log or clue to help, sorry.

Thanks. Goyo.

Change History

Changed 8 months ago by goyo.villalba

Hi,

This morning after the weekend the problem happened again, and I found a error trace:

'localhost openxcap[24981]: [-] Exception rendering: localhost openxcap[24981]: [-] Traceback (most recent call last): localhost openxcap[24981]: [-] File "/usr/lib/python2.4/threading.py", line 422, in run localhost openxcap[24981]: [-] self.target(*self.args, **self.kwargs) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/python/threadpool.py", line 148, in _worker localhost openxcap[24981]: [-] context.call(ctx, function, *args, **kwargs) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line 59, in callWithContext localhost openxcap[24981]: [-] return self.currentContext().callWithContext(ctx, func, *args, **kw) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line 37, in callWithContext localhost openxcap[24981]: [-] return func(*args,**kw) localhost openxcap[24981]: [-] --- <exception caught here> --- localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/internet/threads.py", line 25, in _putResultInDeferred localhost openxcap[24981]: [-] result = f(*args, **kwargs) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py", line 379, in _runInteraction localhost openxcap[24981]: [-] conn.rollback() localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py", line 46, in rollback localhost openxcap[24981]: [-] self._connection.rollback() localhost openxcap[24981]: [-] _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away') localhost openxcap[24981]: [-] Exception rendering: localhost openxcap[24981]: [-] Traceback (most recent call last): localhost openxcap[24981]: [-] File "/usr/lib/python2.4/threading.py", line 422, in run localhost openxcap[24981]: [-] self.target(*self.args, **self.kwargs) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/python/threadpool.py", line 148, in _worker localhost openxcap[24981]: [-] context.call(ctx, function, *args, **kwargs) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line 59, in callWithContext localhost openxcap[24981]: [-] return self.currentContext().callWithContext(ctx, func, *args, **kw) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line 37, in callWithContext localhost openxcap[24981]: [-] return func(*args,**kw) localhost openxcap[24981]: [-] --- <exception caught here> --- localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/internet/threads.py", line 25, in _putResultInDeferred localhost openxcap[24981]: [-] result = f(*args, **kwargs) localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py", line 379, in _runInteraction localhost openxcap[24981]: [-] conn.rollback() localhost openxcap[24981]: [-] File "/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py", line 46, in rollback localhost openxcap[24981]: [-] self._connection.rollback() localhost openxcap[24981]: [-] _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')'

I don't understand what is wrong because MySql server is still running, and OpenSer (that uses the same MySql) also finds users in the data base. As usual after rebooting openXcap it worked again.

Thanks in advance. Goyo

Changed 7 months ago by raf_n

We seem to have the same problem, the first query (xcap PUT) after about 16 hours of inactivity failed. Error trace is the same as above. Restarting openxcap solves the problem...

We're using openxcap 0.9.9, openser 1.3.0 and Twisted-8.0.1_r23165 with py2.5

I wonder if the problem is related to the long period of inactivity (no queries performed over a time of 16 hours) or the uptime (+- 20 hours) of openxcap?

Changed 7 months ago by mircea

  • owner changed from Mircea Amarascu to mircea
  • status changed from new to accepted

Hi,

Yes, this is probably the problem. There is a setting in my.cnf MySQL configuration file to increase this period (for example 24 hours), so you could change this value for now so that the database connection doesn't time out if there are no queries for a long period of time. However, the best solution is to add a reconnect logic in openxcap server, which we will do.

Changed 2 months ago by admin

  • status changed from accepted to closed
Note: See TracTickets for help on using tickets.