[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 819
  • Last Modified:

Scheduled Task In Linux Restart Lampp

I have Suse 10.2 running lampp. Every now and then lampp stops working. I want to set it in cron to restart daily. It is just an intranet setup that could easily restart every morning at 6am
0
muzak
Asked:
muzak
  • 5
  • 3
1 Solution
 
BenMorelCommented:
Hi,
Just create a file (as root) in the /etc/cron.daily/ directory, for example :
/etc/cron.daily/lampp

And put the code below (maybe you'll need to adapt the restart commande).
Maybe you should try to understand why it's crashing instead ?

Regards,
Ben
#!/bin/sh
 
/opt/lampp/lampp restart

Open in new window

0
 
muzakAuthor Commented:
I have looked at error logs and can find nothing. I am also not very well versed in lampp...
here's what is in the log:

[Thu Jan 31 16:16:37 2008] [warn] [client 10.1.25.202] mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed, referer: http://sunrise/
[Fri Feb 01 08:00:21 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Feb 01 08:00:21 2008] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Feb 01 08:00:22 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Feb 01 08:00:22 2008] [notice] Digest: done
[Fri Feb 01 08:00:23 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Feb 01 08:00:23 2008] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Feb 01 08:00:23 2008] [notice] Apache/2.2.3 (Unix) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d PHP/5.2.0
0
 
muzakAuthor Commented:
The include filter happens alot and i believe it is a bug...

the last access was at 4:16 pm yesterday no prob.

8 am today had to reboot
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
muzakAuthor Commented:
added file to restart... when does it run daily? at midnight?
0
 
BenMorelCommented:
Should be at midnight, yes :)

Maybe your server is just under heavy connections, for example someone trying to allocate all open slots of your http server ?
When it'll be "crashed" again, run a netstat command :
netstat -ant | grep ESTABLISHED
If the same IP appears by dozens, you are just under a flood :)

Regards,
Ben
0
 
muzakAuthor Commented:
how do I set the number of open slots?
0
 
BenMorelCommented:
Hi, just increase ServerLimit & MaxClients in httpd.conf.
However this is not a good idea if you're under a flood, it will not solve the problem :)
Have a look at netstat before.
Ben
0
 
muzakAuthor Commented:
the script doesnt seem to be executing. when i click it it justopens in text editor, doesn't give a warning like other scripts in this folder???
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now