• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Roundcube does not work until I restart Apache

mr-wolf

Silver Pleskian
Plesk Guru
I have noticed this several times when I add a new subscription.
The Roundcube-webmail doesn't work after that. I will get a Plesk-page.

A "plex repair web <domain> -y -v" does not fix it either.
A "/etc/init.d/apache2 restart" however DOES fix it.

It's an annoyance only, but something that should be fixed IMHO...
 
Any errors in /var/log/plesk-roundcube/errors ?
No, no errors there. Only failed IMAP-logins from harvesters.

I patched my local hosts-file to do some experimenting....

If I add the subscription "blabla7.com", the server is configured to give a domain without webmail enabled.
This means that http://webmail.blabla7.com will give me Plesk's default page.
All good up until now.
Then I change webmail to "Roundcube".
Nothing changes when I go to http://webmail.blabla7.com

If I do a "kill -HUP <apache2 root process>" it starts to work.

I have tested this now on 4 servers and 2 servers have the correct behaviour, which means it will give me the roundcube without issuing a "kill -HUP"

The 2 "failing" servers were installed on
Feb 2019
May 2018

The 2 working servers were installed on:
March 2017
May 2017
 
Hmmm, just a random thought, but what is your Apache restart intervall?
Code:
# plesk bin server_pref -s | grep restart-apache
 
Another random thought - do you have a kernel with Grsecurity system installed?
 
Hmmm, just a random thought, but what is your Apache restart intervall?
Code:
# plesk bin server_pref -s | grep restart-apache

It's 1800 on the servers where I have this problem and 0 on those that don't have the problem.

~# plesk bin server_pref -s | grep restart-apache
restart-apache: 0

Should I change the value to 180 (3 minutes) on those those servers that are now set to 1800?

Another random thought - do you have a kernel with Grsecurity system installed?
No, I don't have that installed
 
I changed the restart value to 60, but also enabled "graceful restart".
Roundcube became available immediately after enabling it (not after a minute).
I then changed the restart value back to 1800

I expected it to work properly then, but it didn't.
Changing the value to 60 didn't make webmail appear either not even after more than a minute.

I have now set it to 0 and then changes have immediate effect.
I assume that 0 means that there are NO intervals of checking.
Is that correct?
 
Yeah that's what I thought. So you set up a new domain => Apache will be reloaded
Then, you change some settings like Webmail => Apache will not reload immediately but will wait until the number of seconds have passed since the last reload.

So any modification will only take effect after the restart interval seconds have passed.

0 seconds means: Apache will be reloaded immediately after every configuration change. This may be undesired on servers where a lot of changes happen, as each reload will pause Apache for a brief moment.

We use a 2min restart interval on our servers and this works quite ok. Users will see "Your changes will be applied in 2min" when they change something on their configuration.

So if you have a 60 seconds interval then you should see Apache reload the config if you monitor the error_log of Apache.

Maybe to confirm you can do the following test while monitoring error_log:
* Set restart interval to 60 seconds
* Setup a new domain (Apache should reload immediately)
* Change/configure webmail and wait until you see the reload in error_log
* Check webmail. Does it work?
 
I did a test yesterday, but it was inconclusive. I ended up setting the interval to 0, which seemed to be the only way to get roundcube to appear without doing any manual restarts. I decided to test it another day.

I removed the blabla7.com domain yesterday and today I made sure that graceful restart was enabled (because I want it enabled eventually) and changed the interval to 120.

Indeed it worked as you and I expected it to.
Setting graceful restarts enabled and the interval to 120 (or 60) seems to me the best setting.
This does mean you can't verify immediately that webmail is working.
I solve this by enabling roundcube first and then setting up the e-mail accounts.
By the time I've setup a few accounts I have roundcube ready to test it.

Thanks for the hint!! (although it wasn't DNS)

BTW... Are there any downsides reported to using "graceful restarts"? I didn't have that enabled on any of my servers, but I do now. It seems to be a no-brainer to enable it if it actually has no downsides. Is that correct?

I now realize that I posted in the "Onyx thread" although I'm running Obsidian for a while now.
Probably "graceful restarts" isn't implemented in Onyx. I wouldn't know as all my servers are upgraded to the latest.
 
Last edited:
IgorG,

why did you mention:
Another random thought - do you have a kernel with Grsecurity system installed?

Isn't Grsecurity part of ASL?


I have "a domain" that is using roundcube, but a random times, it is not available. My server does not "see" webmail.domain.com .... this could last a minute or 1 hour. Then magically, it all works again... like nothing ever happened?

And crazy enough, this is only happening to this one domain?
 
Back
Top