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
muzakAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.