MyBB Community Forums

Full Version: Error 500 While Using AdminCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am having a bit of an issue that seems like a timeout, but I am not sure what setting to change to make the timeout longer. I have a very large forum (over 2 million posts). When we make changes in admincp it can sometimes take a bit of time, which isn't a big deal, but lately any change that takes longer than 10 seconds gives an Error 500: Internal Server Error message. Some of these changes still take affect, but not always. I am taking a bit of a guess and thinking it has something to do with our my.cnf mysql config, since we had made changes to improve memory usage not to long ago. I am not sure what changed to cause these errors but it is making it hard to manage our forum. The forum url is http://simulationhockey.com and below is our my.cnf:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0

skip-external-locking
key_buffer_size = 480M
max_allowed_packet = 128M
table_open_cache = 256
sort_buffer_size = 4M
join_buffer_size = 2M
read_buffer_size = 4M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 16M
thread_cache_size = 50
query_cache_size = 40M
query_cache_type = 1
query_cache_limit = 5M
tmp_table_size = 16M
max_heap_table_size = 16M

#innodb_use_native_aio = 0
innodb_file_per_table

max_connections=120
max_user_connections=120
connect_timeout=10
wait_timeout=30
interactive_timeout=50
long_query_time=10

#slow_query_log=1
#slow_query_log_file=/var/log/mysql-slow-queries.log


[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
Any help would be greatly appreciated.
I'm not an expert on this, but I would look here first...

max_connections=120
max_user_connections=120
connect_timeout=10
wait_timeout=30
interactive_timeout=50
long_query_time=10

I believe the wait_timeout maybe the culprit.
(2018-12-20, 03:27 AM)Serpius Wrote: [ -> ]I'm not an expert on this, but I would look here first...

max_connections=120
max_user_connections=120
connect_timeout=10
wait_timeout=30
interactive_timeout=50
long_query_time=10

I believe the wait_timeout maybe the culprit.

So I've set wait_timeout to 300 and no improvement. I found some other suggested settings and tried changing those too, but no change. I am starting to wonder if it's not the mysql config causing it to error out. It doesn't seem to matter what I increase it still times out after 10 seconds.

I've enabled php error reporting and now instead of a 500 Error I get a blank white page when trying to do anything that takes more than 10 seconds.
I've checked the httpd and mariadb logs but don't see any errors on the server side related to this.

I was able to get an error message displayed while trying to update a forum's permissions:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12016173 bytes) in /home/admin/web/simulationhockey.com/public_html/inc/db_mysql.php on line 1017

So it tried to allocate about 12mb out of the 128mb available and failed?
Anyone have any ideas?
An internal server error isn't a MySQL error. Hit up your error.log and see what it says.
although it is reporting 128MB exhausted,
looks like 128MB is not really available for the server.

this similar topic can be of some help ..
(2018-12-24, 07:37 AM).m. Wrote: [ -> ]although it is reporting 128MB exhausted,
looks like 128MB is not really available for the server.

this similar topic can be of some help ..

As suggested in that topic I changed the database encoding to utf8mb4, I am no longer getting the error message, but I am still getting a blank page and the changes I make in admincp do not fully complete in the database. The blank page appears after 10 seconds of "loading".

My php.ini does have memory_limit set to 128MB, but I don't think what I am doing should be going anywhere near that much.

(2018-12-24, 07:24 AM)Ben Cousins Wrote: [ -> ]An internal server error isn't a MySQL error. Hit up your error.log and see what it says.

error.log has no entries related to the errors. I have turned on error reporting and set error_reporting to E_ALL in php.ini, but still see no errors on screen or logged in the error.log file.
(2018-12-24, 07:18 PM)DrunkenTeddy Wrote: [ -> ]
(2018-12-24, 07:37 AM).m. Wrote: [ -> ]although it is reporting 128MB exhausted,
looks like 128MB is not really available for the server.

this similar topic can be of some help ..

As suggested in that topic I changed the database encoding to utf8mb4, I am no longer getting the error message, but I am still getting a blank page and the changes I make in admincp do not fully complete in the database. The blank page appears after 10 seconds of "loading".

My php.ini does have memory_limit set to 128MB, but I don't think what I am doing should be going anywhere near that much.

If you’re on shared hosting, PHP can only allocate what it has available to it on the server. You can set an arbitrary limit and not have the resources available to support it.
(2018-12-24, 08:47 PM)Ben Cousins Wrote: [ -> ]
(2018-12-24, 07:18 PM)DrunkenTeddy Wrote: [ -> ]
(2018-12-24, 07:37 AM).m. Wrote: [ -> ]although it is reporting 128MB exhausted,
looks like 128MB is not really available for the server.

this similar topic can be of some help ..

As suggested in that topic I changed the database encoding to utf8mb4, I am no longer getting the error message, but I am still getting a blank page and the changes I make in admincp do not fully complete in the database. The blank page appears after 10 seconds of "loading".

My php.ini does have memory_limit set to 128MB, but I don't think what I am doing should be going anywhere near that much.

If you’re on shared hosting, PHP can only allocate what it has available to it on the server. You can set an arbitrary limit and not have the resources available to support it.

I am on an unmanaged vps. So maybe the issue is in the httpd or nginx configuration? I don't think I've touched either of those configs. Any idea what setting to look for?

We have a large number of usergroups, approximately 75, unfortunately all of these groups are actually used, but I saw it suggested that having too many groups could cause some of these issues. Does anyone know what setting I can increase to allow this to work?
So I gave up... Built a new VM running up to date versions of php and mariadb, copied most of the config over and moved our forum, no longer having these issues. With it being basically the same config I don't really know what fixed it, but maybe it was the new version of php.