Helpful Information
 
 
Category: MySQL Help
update crashes mysql. is db too big for its server?

I have a database running at what I thought was a good hosting service. I think it is running on a pentium pro or pentium ii, under free bsd, as that is what their listed servers all are. My db has about 150,000 rows and 10 columns (two of these are 255-byte chars, the rest are tinyints except for a 4-byte char, two 3-byte date columns, and one full int).

I find that update queries to modify one of the columns (e.g. "update tags set topicint=$newint where topicint=$oldint") often cause a 'connection lost' or 'mysql server has gone away' error message.

I was using php to do the updates but I'm not using the db for any of the calculations - I wrote a script locally to generate the php mysql update statements and then ran the resulting php script just to send the update statements to the mysql server. I got 'connection lost' etc. and I also occasionally got 'out of memory' errors.

I saw in the mysql manual that queries with long results can cause 'out of memory' and sometimes 'connection lost', and that running the queries using the mysql client with the -q option will use less memory.

So I changed my local script to make it generate plain mysql statements and I fed them into the mysql client, using the -q option, from a text file on the server.

I still get the 'lost connection' err msgs and my db got corrupted yet again. The technical support at my hosting service has pointed out that it is my queries which cause these errors and crash the mysqld daemon, and I have no doubt about that. But it seems like their system should be able to handle my queries.

Anyhow, what can be done to stop them? Can you help?


Thanks,
John Clements










privacy (GDPR)