1

First of all, hello to everyone as it's my first post here. Until now, all of my questions have been already asked and answered :) not this time unfortunately.

I have a VPS (Ubuntu 14.04 32bit, 2 GB mem) which is my "sandbox". I test my PHP/MySQL application and learn to use and manage Linux server. Since about a week MYSQL performed quite slow. It took a few seconds for a SELECT (no JOINs) in a ~2 million records table.

Today, I found some time to take care of it and to look for a problem. I've read a few discussions on MySQL optimisation. I found out via SolusVM control panel that server uses 100% memory. I tried top to check what process consumes most of memory but it didn't sum up to 100%. The largest process was MySQL with about 33% of memory.

I rebooted the server and after first reboot it closes all connections in ~2 minutes. After each reboot in ~2 minutes I get:

  • an error in Putty "Server unexpectedly closed netword connection".
  • any domain hosted on that server returns "connection timeout error"
  • WinSCP tries to connect to server and returns no error, starts over and over again to make a connection

In syslog file I have no info about problems - just an info that mysql tables need an update.

In these 2 minutes between log in (via Putty) and closing connection by server I tried to stop some services, like mysql, cron, postfix, apache and proftpd. After each test one by one server was closing connection in ~2 minutes after reboot - so it had no impact on server behaviour.

What I've noticed watching Memory Usage in SolusVM control panel. When the connections are closed, the memory usage drops from ~40% to ~20% and than in a few seconds increases to ~50% and later in a few minutes it reaches 100%.

What else can I check to find out what happens in these 2 minutes after reboot?


EDIT:

I need to also add that since my last login to the server in the root directory appeared "aquota.group" and "aquota.user" files. I don't understand why yet. But tried quotaoff command. After this, server closed connections in ~2 minutes after reboot - so...nothing changed.

1 Answer 1

0

After an hour or so from last reboot, server started to repond and to accept connections but memory usage was at 100%. I've just found the problem. One of scripts executed every minute by CRON saves its result to a log file which grew to almost 8 GB. I deleted file's contents and memory usage dropped to ~50%.

I've just rebooted the server once again and...everything seems to work just fine. Looks like the script I've mentioned before was trying to open the large file but server lacked in memory to do it. I'm just wondering how was it able to open it before and let it grow to such a large size...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .