Calling all (linux) server guru's

Rickster

EVGA Fanatic
Joined
Jul 31, 2012
Messages
15,530
#1
Hi guys, we have having a small issue with our dedicated server which we use for test websites so we have a domain acbtest.co.za and all the website has is links to wordpress sites which have their own database.

Now when a dev is publishing to their site it would sometimes randomly get a Internal server error 500.

I have:

Increased the PHP memory limit to -1 (unlimited)

Rebooted the Apache Web server.

Anything else i can do?

Thanks.
 

jsheed_sa

Expert Member
Joined
May 27, 2005
Messages
4,945
#2
Hi guys, we have having a small issue with our dedicated server which we use for test websites so we have a domain acbtest.co.za and all the website has is links to wordpress sites which have their own database.

Now when a dev is publishing to their site it would sometimes randomly get a Internal server error 500.

I have:

Increased the PHP memory limit to -1 (unlimited)

Rebooted the Apache Web server.

Anything else i can do?

Thanks.
1.) Check Permissions
2.) Check .htaccess
3.) Is PHP referencing internal items only or are there any external items referenced?
 

hoodie

New Member
Joined
Feb 13, 2018
Messages
8
#6
Hi Rickster, are you using mysql ?
The database user has full access to the database tables ?
Have you considered looking at my.cnf to increase the sql timeout ?
If the timeout is increased, does the error go away or just take longer to show ?

Make a backup of my.cnf before making any changes so you can revert back.

You would look at something like this
wait_timeout = 32000
interactive_timeout = 32000

and remember to recycle mysql after the values are set.

Also see what you find in the mysql servername.err logs
 

Rickster

EVGA Fanatic
Joined
Jul 31, 2012
Messages
15,530
#7
Hi Rickster, are you using mysql ?
The database user has full access to the database tables ?
Have you considered looking at my.cnf to increase the sql timeout ?
If the timeout is increased, does the error go away or just take longer to show ?

Make a backup of my.cnf before making any changes so you can revert back.

You would look at something like this
wait_timeout = 32000
interactive_timeout = 32000

and remember to recycle mysql after the values are set.

Also see what you find in the mysql servername.err logs
Yes, mySQL.

Are you able to help me navigate through the WHM to find out all this stuff, im clueless.
 

hoodie

New Member
Joined
Feb 13, 2018
Messages
8
#9
Try adding this:
wait_timeout=32000
interactive_timeout=32000

Then recycle the mysql service, if it doesnt start, remove the new lines and recycle the service again.

If the service does start however (as I suspect it should) then test if the errors still persists.
 

Rickster

EVGA Fanatic
Joined
Jul 31, 2012
Messages
15,530
#10
Try adding this:
wait_timeout=32000
interactive_timeout=32000

Then recycle the mysql service, if it doesnt start, remove the new lines and recycle the service again.

If the service does start however (as I suspect it should) then test if the errors still persists.
How do i type in this?

I cant edit or add anything.
 

hoodie

New Member
Joined
Feb 13, 2018
Messages
8
#11
cd /etc
nano my.cnf
add these to the bottom:
wait_timeout=32000
interactive_timeout=32000

Press Ctrl + X
Press Enter
You will be back in the shell,
Type service mysql restart
Or service mysqld restart
depending on the OS you are running the mysql service will now restart
If your mysql refuses to start now,
nano my.cnf
remove the lines you added
press CTRL + X
press Enter
service mysql restart
or
service mysqld restart
then the change is reverted
 

hoodie

New Member
Joined
Feb 13, 2018
Messages
8
#12
I presume you are running this as root,
if not, do you have the root password ? or are you in the wheel group ?
If you arent root but you have super admin rights, try
sudo nano /etc/my.cnf
 

WAslayer

Senior Member
Joined
May 13, 2011
Messages
857
#13
did you get this fixed yet..?

internal 500 errors will have more detailed reasons for the error logged in the apache error log.. start there, checking the log for timestamped entries correlating to the time you got the 500 error and work your way from that logged error to resolve the issue..
 

lsheed_cn

Expert Member
Joined
Sep 14, 2008
Messages
2,560
#14
As others have said, you need to look at the logs.

Apache, and PHP logs will show why things are crashing. generally in these folders depending on your OS / settings -

/var/log/php
/var/log/apache

You can also turn on error checking in wordpress, which will also be of help.
in wp-config.php add

define ('WP_DEBUG', true);
define ('WP_DEBUG_LOG',true); // goes to /wp-content/debug.log

That will likely be more help than apache or php, for specific wordpress issues.
 
Top