Den 10/10/2010 kl. 16.34 skrev Massimiliano della Rovere:

> Using django 1.2.3 with celery 2.0.3 and django-celery 2.0.3 and mysql
> 5.1.41 on kubuntu 10.04, I receive the following error:
> OperationalError(2013, 'Lost connection to MySQL server during query').
> 
> The error occurs every time the task is executed and seems to be
> related to the execution time, in fact when I process smaller files
> (let's say 8000 lines) everything is fine and task ends with success.
> The current files count about 242000 lines and execution started at
> 13:17:01 and failed at 16:08:47.
> I noticed using htop that cpu load is about 100% on both cores;
> (Intel(R) Xeon(R) CPU 3040 @ 1.86GHz). Could this cause the mysql
> error 2013?
> 
> The python code is quite long, and I am not copying it here because
> the error is mysql related..

* Are you keeping a connection open to MySQL the whole time?
* What are the values of your timeout settings in the MySQL server 
configuration?
* Anything in the MySQL server error log?
* Anything in the MySQL slow query log, if you have that set up?
* Which process(es) on the server is using 100% CPU time?

I suspect that you're opening a connection to the server, doing something in 
Django for a long time, and then trying to use the connection. At this point 
MySQL has lost patience and closed the connection.


Thanks,
Erik

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to