Hi,
Almost everytime there is a problem cause by the server (not to often but it can happen) some of my sites do have a 503 error.
This is because something is wrong with the cache folder of CMSMS (tmp\cache).
Removing all the files from the cache folder (except index.html) solves the problem.
I have to clean this folder via FTP because I cannot start the CMSMS Admin console (also a 503 error).
How can I prevent this 503 error (I hear you say, do not have server problems) after a server problem.
Should this cache folder not be cleared automaticly or ....
Please advise.
Error 503 after Server Problems
-
- Power Poster
- Posts: 462
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Error 503 after Server Problems
I don't think you could set anything to clear the cache *after* a server issue, as anything trying to run would have the same error. You could try setting the auto cache clear to be more frequent so there's fewer files to potentially corrupt on a crash (Global Settings > Advanced Setup > Remove cache files that are older than x days).
Not getting the answer you need? CMSMS support options
-
- Power Poster
- Posts: 462
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Error 503 after Server Problems
Thank you DIGI3 for your answer.
I will try to make a script that checks the website and if needed deletes the files (except index.html) from the folder \etc\cache.
Very annoying when I'm on a holliday and a customer calls me that he is getting a 503 error (because the server was down for 5 minutes).
Would be nice if CMSMS would clean (or ignore) the cache folder if a bad cache files was detected.
Thanks again for your help.
I will try to make a script that checks the website and if needed deletes the files (except index.html) from the folder \etc\cache.
Very annoying when I'm on a holliday and a customer calls me that he is getting a 503 error (because the server was down for 5 minutes).
Would be nice if CMSMS would clean (or ignore) the cache folder if a bad cache files was detected.
Thanks again for your help.
Re: Error 503 after Server Problems
if the error 503 happens the CMSMS setting won't have any effect, would it?DIGI3 wrote: ↑Fri Jun 14, 2024 1:31 pm I don't think you could set anything to clear the cache *after* a server issue, as anything trying to run would have the same error. You could try setting the auto cache clear to be more frequent so there's fewer files to potentially corrupt on a crash (Global Settings > Advanced Setup > Remove cache files that are older than x days).
@musicscore: you could also setup a real cron job in your server user interface (CPanel?) to run (instead of rely on the CMSMS clearing routine.
-
- Power Poster
- Posts: 462
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Error 503 after Server Problems
Thanks Creopard,
I will setup a cronjob indeed to clear the cache every 15 minutes. So when the cache gets damaged, the cache is cleared every 15 minutes.
This will prefent me from clearing the cache manually in a event of cache damaged. (and I'm on a hollyday/vacation)
Thanks for the tip anyway.
I will setup a cronjob indeed to clear the cache every 15 minutes. So when the cache gets damaged, the cache is cleared every 15 minutes.
This will prefent me from clearing the cache manually in a event of cache damaged. (and I'm on a hollyday/vacation)
Thanks for the tip anyway.
Re: Error 503 after Server Problems
Just as a note:
We need more information on the versions of CMSMS, PHP, etc you are running. There was some time ago a race condition that could have the consequences you described. It took a while to fix it (it wasn't easily reproducible) but it was fixed, and there have been no other reports of similar behavior until now. We need to be able to reproduce an issue so that we can fix it. Another thing to look for is a 3rd party module or a UDT that may be the culprit...
We need more information on the versions of CMSMS, PHP, etc you are running. There was some time ago a race condition that could have the consequences you described. It took a while to fix it (it wasn't easily reproducible) but it was fixed, and there have been no other reports of similar behavior until now. We need to be able to reproduce an issue so that we can fix it. Another thing to look for is a 3rd party module or a UDT that may be the culprit...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
- Power Poster
- Posts: 462
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Error 503 after Server Problems
Here my site info :
----------------------------------------------
Cms Version: 2.2.18
Installed Modules:
AdminSearch: 1.0.6
CGContentUtils: 2.4
CGExtensions: 1.63.3
CGGoogleMaps2: 1.1.1
CGSimpleSmarty: 2.2.1
CGSmartImage: 1.22.7
CMSContentManager: 1.1.10
CMSMailer: 6.2.14
Captcha: 1.0
CmsJobManager: 0.1.3
DesignManager: 1.1.10
FileManager: 1.6.13
FilePicker: 1.0.6
FormBuilder: 0.8.1.6
JQueryTools: 1.4.2
MicroTiny: 2.2.5
ModuleManager: 2.1.9
Navigator: 1.0.9
News: 2.51.12
Search: 1.53
ThemeManager: 1.1.8
TinyMCE: 3.2-beta6
Config Information:
php_memory_limit:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/Amsterdam
permissive_smarty: false
Php Information:
phpversion: 7.4.33
md5_function: Aan (Waar)
json_function: Aan (Waar)
gd_version: 2
tempnam_function: Aan (Waar)
magic_quotes_runtime: Uit (Onwaar)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: Geen tijdsverschillen gevonden
test_db_timedifference: Geen tijdsverschillen gevonden
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Uit (Onwaar)
output_buffering: Aan
disable_functions:
open_basedir:
test_remote_url: Succes
file_uploads: Aan (Waar)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/cpanel/php/sessions/ea-php74 (0700)
session_use_cookies: Aan (Waar)
xml_function: Aan (Waar)
xmlreader_class: Aan (Waar)
check_ini_set: Aan (Waar)
curl: Aan
Performance Information:
allow_browser_cache: Uit (Onwaar)
browser_cache_expiry: 100
php_opcache: Uit (Onwaar)
smarty_cache: Uit (Onwaar)
smarty_compilecheck: Uit (Onwaar)
auto_clear_cache_age: Uit (Onwaar)
Server Information:
Server Software: LiteSpeed
Server Api: litespeed
Server Os: Linux 4.18.0-513.24.1.lve.el8.x86_64 Aan x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.11.7
Server Db Grants: Er is een "GRAND ALL" permissie gevonden, alles lijkt in orde.
Permission Information:
tmp: /home/xx/public_html/tmp (0777)
tmp_cache: /home/xx/public_html/tmp/cache (0777)
templates_c: /home/xx/public_html/tmp/templates_c (0777)
modules: /home/xx/public_html/modules (0755)
uploads: /home/xx/public_html/uploads (0777)
Bestandscreatiemasker (umask): /home/xx/public_html/tmp/cache (0777)
config_file: 0444
----------------------------------------------
Thanks for your mail
----------------------------------------------
Cms Version: 2.2.18
Installed Modules:
AdminSearch: 1.0.6
CGContentUtils: 2.4
CGExtensions: 1.63.3
CGGoogleMaps2: 1.1.1
CGSimpleSmarty: 2.2.1
CGSmartImage: 1.22.7
CMSContentManager: 1.1.10
CMSMailer: 6.2.14
Captcha: 1.0
CmsJobManager: 0.1.3
DesignManager: 1.1.10
FileManager: 1.6.13
FilePicker: 1.0.6
FormBuilder: 0.8.1.6
JQueryTools: 1.4.2
MicroTiny: 2.2.5
ModuleManager: 2.1.9
Navigator: 1.0.9
News: 2.51.12
Search: 1.53
ThemeManager: 1.1.8
TinyMCE: 3.2-beta6
Config Information:
php_memory_limit:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/Amsterdam
permissive_smarty: false
Php Information:
phpversion: 7.4.33
md5_function: Aan (Waar)
json_function: Aan (Waar)
gd_version: 2
tempnam_function: Aan (Waar)
magic_quotes_runtime: Uit (Onwaar)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: Geen tijdsverschillen gevonden
test_db_timedifference: Geen tijdsverschillen gevonden
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Uit (Onwaar)
output_buffering: Aan
disable_functions:
open_basedir:
test_remote_url: Succes
file_uploads: Aan (Waar)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/cpanel/php/sessions/ea-php74 (0700)
session_use_cookies: Aan (Waar)
xml_function: Aan (Waar)
xmlreader_class: Aan (Waar)
check_ini_set: Aan (Waar)
curl: Aan
Performance Information:
allow_browser_cache: Uit (Onwaar)
browser_cache_expiry: 100
php_opcache: Uit (Onwaar)
smarty_cache: Uit (Onwaar)
smarty_compilecheck: Uit (Onwaar)
auto_clear_cache_age: Uit (Onwaar)
Server Information:
Server Software: LiteSpeed
Server Api: litespeed
Server Os: Linux 4.18.0-513.24.1.lve.el8.x86_64 Aan x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.11.7
Server Db Grants: Er is een "GRAND ALL" permissie gevonden, alles lijkt in orde.
Permission Information:
tmp: /home/xx/public_html/tmp (0777)
tmp_cache: /home/xx/public_html/tmp/cache (0777)
templates_c: /home/xx/public_html/tmp/templates_c (0777)
modules: /home/xx/public_html/modules (0755)
uploads: /home/xx/public_html/uploads (0777)
Bestandscreatiemasker (umask): /home/xx/public_html/tmp/cache (0777)
config_file: 0444
----------------------------------------------
Thanks for your mail
Re: Error 503 after Server Problems
Unless you don't want to upgrade to PHP 8.x anytime soon, you should at least activate this option if possible:
php_opcache
php_opcache
-
- Power Poster
- Posts: 462
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Error 503 after Server Problems
I solved the problem by creating a cronjob with this command :
find /home/{accountname}/public_html/tmp/cache -type f ! -name index.html -exec rm -rf {} \;
It clears the cache every 15 minutes. Not nice but it works. If a server goes down and the cache is damaged, max 15 minutes later the cache is cleared.
find /home/{accountname}/public_html/tmp/cache -type f ! -name index.html -exec rm -rf {} \;
It clears the cache every 15 minutes. Not nice but it works. If a server goes down and the cache is damaged, max 15 minutes later the cache is cleared.