MySQL Crashes the System OS!

AsadMoeen

Verified User
Joined
Oct 20, 2010
Messages
68
Hello.


Recent History :

1st Error : I would be a lot specific since I have been facing this problem from almost a month now . I used a Debian 5.0 Lenny installed on a VPS through VMware's server 2.0.2 . It worked well for the start but after-wards I faced a problem once . One day suddenly all my websites and even my machine was dead. I had no console at that time to see the error. The only thing I could do was restart the machine which I did to fix the error. However, I notified Directadmin support about it and he made some changes about which I think that those changed did nothing. Because I had this error back after 6-9 days.



Minor crashes in-between :
Now during the mid-days after the 1st crash my OS started giving me little crashes which I presume was the cause of the changes made by Directadmin support and some SQL errors too. Actually SQL server sometimes failed to start or crashed in-between and failed to find the socks file. I asked them to fix this SQL crash which they did perfectly but I think made a lot of changes due to which my whole system OS kept crashing almost daily .I asked them to undo any changes they made and optimize stuff for usage properly and fix the SQL error in some other way which they did . Just to be more sure, I installed VMware Workstation with a full bought license and moved my VPS to it just to be sure VMware server was not causing the crash. After all the changes made to OS and VPS Host software, these minors errors were removed.


What Happened Today :


2nd Error : This is the same error related to the 1st one because the crashed OS error was of the same type like the 1st one . After the changes made by Support to the OS ( for the minor errors ), Directadmin was working well and remained running for 3 days and 12 hours after which the OS crashed again. This time I had console enabled on the VPS machine so I could see what caused the crash. I could see it was MySQL that caused the crash. I have attached the screenshot of the error I got today . I restarted the machine again today and the VPS was back online. I'm not very good at checking the logs. So I submitted the Screenshot to Directadmin support. I also gave them Full-Root access to my machine so they can see logs and fix the error. But I think the guy helping me is not very good at debugging or directadmin. He has done a lot, I appreciate that but we want a real fix. He has been trying different things when the error came 1st time but nothing seems to fix the problem.



I am still waiting for his reply about the Crash today but just about one hour ago. My site was like not responding for 10 mins though everything was running and nothing was crashed . I logged into the machine and saw massive usage of RAM which kept increasing and then came down slowly. When it came down, the site was back online. At the same time, I checked my server through http://ip-address/server-status ( A script directadmin support guy gave to me ) . I did not know how to read this so I saved the pages when the sites were dead and also when they came back online. I also sent all this information to Directadmin support and still waiting for his reply.



So overall today ,
1st one about the Crash and 2nd one about the Usage, I am waiting for his replies . I am also attaching a zip file when the server was about to crash but usage started decreasing then and it was saved. A screenshot of the crash is also saved. Please see to it and suggest a fix.




Note : My website traffic is not very high these days. Hardly 3 persons are visiting the site simultaneously. The traffic was very high once about 10 days back when I had 2500 visitors that day but after Google penalized my site, traffic disappeared.
 

Attachments

What the hell is with the giant text...thats annoying as hell.

The solutions is very simple...add more memory to the vps.
 
Sorry for that but many people do not understand without that way.

People are dumb and really need to understand better.
 
Hello,

I've just replied to you via email for this issue.

Your system needs more memory: you've run out.
1 gig of real ram, and only 400 meg of swap.

Recommended: 2x real ram in swap = 2 gig of swap, as per our system requirements page:
http://www.directadmin.com/install.html

If possible, more real ram as well. (these days, 2 gig of real ram or more)
I've also installed the my-large.cnf (for systems with 512 meg of ram) to lower the resource usage of mysql, but this will be a slight performance decrease as compared to the my-huge.cnf.

John
 
Sorry for that but many people do not understand without that way.

People are dumb and really need to understand better.

Just so you know I did not read the post at all because of the giant text.
 
Hello,

I've just replied to you via email for this issue.

Your system needs more memory: you've run out.
1 gig of real ram, and only 400 meg of swap.

Recommended: 2x real ram in swap = 2 gig of swap, as per our system requirements page:
http://www.directadmin.com/install.html

If possible, more real ram as well. (these days, 2 gig of real ram or more)
I've also installed the my-large.cnf (for systems with 512 meg of ram) to lower the resource usage of mysql, but this will be a slight performance decrease as compared to the my-huge.cnf.

John


Ok I see. I can put more Swap if required.

I have total 3GB ram so I should be doing it like 1GB real ram and 2GB for swap memory ? Not sure so please advice. How should I be adjusting swap on a 3GB ram ?

Some more things I wanted to ask,

Why does directadmin need swap when real ram is there ?


Why does the usage start growing in no order ? This would cause system and websites to be slow eventually. Things should work fully stable.


Suppose someone have a small VPS with 512MB ram as he can afford only that so what should he do if directadmin can't even support 1GB ram ?




Just some questions that came into my mind. I can adjust swap but I am sure that usage of real ram would still grow like mad. Please answer.
 
One more thing,

What's the command for adjusting swap memories ?

If possible, you can adjust my swap yourself since I really don't know how to do this and there is no option of adjusting it in VMware workstation so I think it should be done through the SSH.


And since you said other Ram as real RAM so what is Swap ? Is it some virtual RAM or un-real RAM . Like the way it works ?
 
Also, when you set the Swap please set it according to it doesn't cross maximum 3GB I can use for my system.
 
None of these issues are DirectAdmin issues. DirectAdmin has about as low a memory footprint of any hosting management system.

If I had 3 GB of RAM, I'd create 3 GB as main memory and a 1 GB partition as swap. But many admins would do it differently.

I've got many machines in use with only 1 GB of RAM; they all work. They all work with MySQL.

How much use does your MySQL get? How big are the databases? Are they in continuous use (heavy usage with MySQL-driven sites)?

I'd tend to believe DirectAdmin staff when they say you haven't got enough memory; they've looked into your server and I haven't. Obviously your memory needs depend on your resource usage. We've run machines with 512MB total memory, but not in a long time. DirectAdmin worked fine on them, and DirectAdmin hasn't grown in system usage since.

Perhaps you're trying to fit a large site into a small machine?

Jeff
 
More: swap memory is usually a partition or file; it comes out of your total disk space. As to specifically how to do it on your VPS, you'd have to ask your provider.

Jeff
 
Well no that's wrong.


My website is basically a blog of Wordpress so it uses SQL according to it.

Once I had 2500 visitors in one day but since my website got penalized so my average since then is 400-500 daily visitors which are very few. Even 2500 visitors are very few according to me and according to how much traffic I plan to bring to my website in coming months.


I need a proper base to host it up and I feel Directadmin could provide me a way for this. I understand now that Swap is basically an area from the Hard Disk not the ram. Actually I was confusing this .


So that's easy . I can get the real ram increases to 2GB and put 4GB swap. I will do the real ram myself since that's what can't be done through the machine but swap file I request directadmin to increase it to 4GB then.



So coming to the point again, Why would the usage even grow if traffic is almost nothing ? Why does it even cross a 512 MB , well not just cross it touches a 1GB and crashes the whole OS.


We can see if increasing RAM fixes the issue although I highly doubt this. Even 512MB is a lot for websites if usage is properly optimized. I just really don't understand why does it even go that high and what's causing this.

Actually by increasing RAM, what we are doing is giving a patient a medicine to his treatment for an illness but what I am talking about is finding what caused the illness. So this is basically what I want to express.
 
It could also be the OS that is causing this high usage because I am using a pre-installed version of Debian 5.0 Lenny for VMware workstation but I'm quite sure it's not the OS because it was a clean OS and we still have the logs to find the issue if we search them properly. I saw some spam of a command when I searched the /var/log/auth.log file to find the issue. Maybe the auto spams in Apache and SQL cause the issue . But I really don't know how to read those commands and files . I asked DA support to do that though
 
Not sure but what about Installing a New latest Debian 5.0.6 and moving everything to it but seriously there should be something to fix this issue on the Current Debian 5.0 OS too and more-over its Lenny with no extra installations.
 
I need a proper base to host it up and I feel Directadmin could provide me a way for this.
DirectAdmin sets up a typical environement for shared hosting. You have to figure out the best my.cnf settings for your needs. DirectAdmin has no special analysis tools for this.
I understand now that Swap is basically an area from the Hard Disk not the ram. Actually I was confusing this .
Many beginners to OS administration do. Linux manages real memory well; what it can't do is create more memory. So it moves data in and out of swap when memory gets tight, to avoid a complete failure.

Unfortunately that doesn't help if time is of the essence (as it usually is in a webserver); the httpd protocol times out before the data is swapped back out from swap memory.
but swap file I request directadmin to increase it to 4GB then.
I don't know what you mean. Do you mean DirectAdmin the company, or DirectAdmin the software?

If you're using a swap file, then yes, it can be created in a running sytem. If you're using an actual swap partition, then how you do that depends a lot on how your VPS is provisioned and you'd need to ask your VPS provider.
So coming to the point again, Why would the usage even grow if traffic is almost nothing ? Why does it even cross a 512 MB , well not just cross it touches a 1GB and crashes the whole OS.
I don't have any idea; I'm not monitoring your server. I suggest you monitor your memory usage with top, but if you need more advanced monitoring perhaps ideas in one of these two links will help you:

http://unixlive.editboard.com/gener...eval-on-linux-process-wise-and-general-t4.htm

http://unixlive.editboard.com/general-linux-admin-stuff-f3/how-much-ram-is-used-per-program-t5.htm

Jeff
 
Back
Top