Reply To: Gateway Timeout

#13135

Ernest Marcinko
Keymaster

Hi Brent,

I'm going to take a guess here, because it absolutely does not make sense how the post contents are disappearing over time, and how the search is connected to this in any way, as there is no single line of code in there making any kind of changes to the posts content.

Is it perhaps possible, that the issue is connected to maybe one of the caching solutions, and whenever a plugin is disabled, the cache is re-built automatically, and the problem stops? Since ajax search pro is first in the plugins list due to it's folder name, obviously it was disabled as first, and since the problem was resolved, it was marked as the cause. This would also explain how the issue comes back over time, and at the point of failure disabling a plugin just forces the cache to re-initalize, solving the issue.

The only way to prove this, is to somehow re-create the issue, and this time, instead of disabling the search plugin, disable few other active plugins by renaming the folders – and if that helps, the problem is indeed something else.

I'm not saying this to shift the blame somewhere else, but I honestly can't see how it is possible for the contents to just randomly disappear, at random times, and even stay that way (!?) after. And on top of that the problem does not re-occur even after when the search is re-activated, it's more than suspicious.

I've even checked the server error logs, but there is almost nothing in there, except for some empty lines, and this one particular path re-occuring:

/home/brentsda/public_html/brentwallace.net/wp-content/uploads/db-backup/Marta_Howell_Designer_Jewelry_2017_05_06_1494041602_1819af6_wpdb.zip

..this is related to some kind of database back-up plugin, but there is no error message, so this should not be an issue at all. I think it's unrelated.

One other very significant thing I have noticed, is that the memory limit might be set to a very low value in the wp-config.php file:

define( 'WP_MEMORY_LIMIT', '128M' );

Considering how many plugins you have active, I believe 128 MB of memory is almost definitely not enough, and can actually cause similar issues you are experiencing (without any errors even).

I would recommend changing that to at least 512M or even 1024M to be absolutely sure:

define( 'WP_MEMORY_LIMIT', '1024M' );

I usually initially set it to 1024M, and then wait a few days, and lower it 512M then again wait a few days and lower it again… until some kind of error occurs, then I use the last working value times 2. Usually it comes to 512 or in rare cases 256 if I only use a few plugins.

This is the best answer I can give you, as there is no indication of what I could or should change in the plugin, nor any suspicious code best to my knowledge.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)