• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Cron Jobs

T

twtw

Guest
I recently needed to switch from shared hosting to a dedicated server because of increased traffic, and I am trying to learn how to manage my server, but I need to learn a lot. My server has been slowing down and sometimes crashing during times when virtually nothing is happening on the server (very low traffic days) and I don't know why. I have looked in the logs, and there is nothing that indicates an error or anything like that. I have been watching the memory allocation via "top", "free" and "vmstat" and I suspect there may be a memory problem because as time goes by, the memory values keep increasing. I would like to run a restart script at night, that way each day my server starts with the memory reset. I created a server_restart.sh script that looks like

#!/bin/bash
shutdown -r now

and added a cron job via Plesk
bash /private/scripts/server_restart.sh

The logs indicate that the script ran, but it doesn't actually restart the server.

Any help is appreciated!
 
1. which user you added the cronjob as ?

2. why would you restart your linux server ? if you really think this is the solution, then i think you should reformat the box or change some hardware...

let's be realistic

you should post your linux distro and version, as well as plesk version. some hardware info would be good too. RAM, CPU, ...

is there many sites on the box ?

what is the symptoms when your box is "crashed" ?

is it not accessible at all via ssh, plesk ?

run dmesg and see for any warnings or errors...
 
Thank you for the reply.

I added the cron job as root.

The server specs are:
CPU: Dual Xeon Hyperthreaded
1024 Mb of RAM
Plesk 7.5.4
Linux version 2.6.12-2.3.legacy_FC3smp ([email protected]) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Sun Feb 19 08:53:09 EST 2006
I host 4 sites on the box, and the days of the crashes have almost no activity on any of the sites.

Sometimes the box crashes completely and other times it stops responding to requests, but doesn't crash. I can't login through ssh, I can't access anything through plesk, I have to call the company and ask for a reboot. The server has been working now for 1 day and 16 hours, but I am guessing it will have problems again sometime this week.
 
That is what I suspected, but when I suggested that to the host company, they were not very receptive.
 
Back
Top