mySQL problems

Tino Wildenhain tino at wildenhain.de
Tue Oct 28 13:45:06 CET 2008


Hi,

Alfons Nonell-Canals wrote:
> Hello,
> I've developed a program using python that have to connect to a mysql
> server several times.
> 
> In a local machine (running the program in the same machine where the
> mysql server is) I have no problems. I can run several instances of the
> program at the same time with no problem.
> 
> Them problem arrives when I try to distribute the tasks to different
> machines, for example, in a cluster. In this situation, the machine that
> runs the python program is different than the machine that hosts the
> database. 
> 
> If I run the python program only an other machine, only one run of the
> program, there is no problem. But, If I run the program in different
> machines, all of them connecting to the same database server, randomly,
> it crash. Crash all running programs! at the same time.
> 
> The output is clear:
> 
....
> _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL
> server on 'HOST' (110)")
> 
> 
> It is clearly related with the connection to the mySQL server. As I
> said, it only happens when there are more than one programs running in
> different machines (or in the same) but conecting to a mysql server that
> is in an other machine. And... it is random, sometimes happens and
> sometimes no...

Maybe there is a certain connection limit which hits if your client
programms reconnect in random order? I saw this on some PHP web sites.

Probably some configuration adjustments and persistent connections
could help you in this situation.

Also, was the choice of MySQL a conscious one?

Regards
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20081028/b6fb0e43/attachment.bin>


More information about the Python-list mailing list