MODX Community

Random blank page error 500 in manager & front

hello,

I get randomly blank page when I save resources.
If I purge the cache manually via FTP pages can load normaly.

I get the following error in front (500):

Parse error : syntax error, unexpected ‘<’, expecting end of file in masked/home/masked/masked/masked/cache/ck154e_hj57a/lexicon_topics/lexicon/en/clientconfig/default.cache.php on line 81

I have reinstalled clientConfig, but the problem still.
It seems especially occurs with OVH shared hosting.
PHP version is 7.2

I have an another MODX website at OVH with similar caching problems.

Does this persist if you disable Client Config?

Yes, after a few post reading I decided to desactivate these settings :

cache_lang_js
cache_lexicon_topics <<<< disabled
cache_noncore_lexicon_topics <<<< disabled

(from https://github.com/modxcms/revolution/issues/9667)

For the moment the problem seems resolved.

I’m thinking about the OVH shared hosting performance because it occurs after several/multiple and intensive resource saving in a short time (snippets, chunks), corrupting lexicon files.

I have never encountered this problem on my dedicated server.

Thanks for you reply :wink:

I’ve heard of issues related to MODX on very inexpensive hosts that might have misconfigured CloudLinux as their OS. I know A2 in the US had this and they worked with us to get this resolved so there wouldn’t be similar issues. It could be that there just isn’t enough resources or there are thread limits on the account.

In fact this change doesn’t resolve the problem.
Another warning message:
2019-05-13%2011_41_32-Calipers

Could that be related to hosting performance or restrictions, exclusively?

Yes the problem persists.

This is an indication that the flock mechanism (locking files for writing) does not work reliably. As a result the file gets written to twice.

In your core/config/config.inc.php file, you can try adding use_flock to the $config_options array:

$config_options = array(
    'use_flock' => false,
);

That will make MODX use a different method for file locking, which may work more reliably, especially on hosts with networked harddisks.

2 Likes

Had similar in the past and this post helped me solve it. If not, does switching back down to php7.1 solve it? https://github.com/modxcms/revolution/issues/13729

I tried this setting (use_flock : false), without success.

This an advanced & hardened MODX installation.
The config key has special chars (_), something like:
ck_fd2e4rd64ept4z

The current version of PHP is 7.2.15

I changed this key, by removing the “_”
Regarding this specific point (the config key), I never noticed a problem on my dedicated server, but maybe use of some special characters is restricted by hosting (?).

UPDATE
problem persists with a simple config key.

Can you name the hosting company? I had very similar problems last year but can’t remember which host it was.

In the original post he mentioned OVH Shared hosting.

Ah sorry - missed that

OVH, “pro2014” hosting offer.

I just looked back at my records and I had this problem a couple of times and solved it using flock but with TSOhost I never resolved it and ended up having to move the site. The problem came down to the fact that the cache files were appended and not replaced.

I opened a ticket at ovh and I’m waiting for their answer…

Update : OVH simply advises to move from shared hosting to a dedicated server, without indicating the possible cause of this problem or even providing leads…

For now, the only way to avoid this corruption is to disable all MODX caches …

Final words:

The cache corruption problem occurs on all my MODX websites I installed at OVH, with frequency variations. The only way to prevent global crash in front & back is to disable all caches.

Also OVH didn’t allow use of ports 465 en 587 for SMTP. Then use of external smtp server to send emails is impossible. Mail sending with SMTP off works but potentially expose to blocking spam/detection mechanism.

I cannot recommend to choose OVH ‘pro’ shared hosting for MODX…

I started to run test on INFOMANIAK where I ran my first MODX installation 5 years ago :slight_smile: , I’ll send a report next.

I confirm MODX works perfectly with Infomaniak shared hosting !