• 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

Resolved Renaming a domain + operation taking too long + Maximum execution time

tetrahall

Basic Pleskian
Hi
I am trying to rename a domain, after 10 minutes it stops with the following message:-
This operation is taking too long. Check the results in a few minutes. I waited for an hour - no change!

The log file: "/var/log/plesk/panel.log" contains this:-
[13-Apr-2019 01:03:13 Europe/London] PHP Fatal error: Maximum execution time of 600 seconds exceeded in /usr/local/psa/admin/plib/Db/Table/Row.php on line 96
[2019-04-13 01:03:13.017] ERR [1] ERROR: Maximum execution time of 600 seconds exceeded (Row.php:96)

For some unknown reason, it appears to be populating the table "spamfilter" and it stops almost half way. Spamassassin is not enabeled (but that might be a side point).

The file: "/usr/local/psa/admin/plib/Db/Table/Row.php" is not editable.
How can the maximum execution time for this operation be increased?

Thank you!
 
Before doing anything else in this case, I suggest to try to restart all Plesk related services:
# service psa stopall
# service psa start
Sometimes a service hangs for unknown reason.
 
Thank you, Peter. I have restarted all Plesk services to no avail. The same message is displayed, and panel.log states again "Maximum execution time of 600 exceeded .. etc.."

The odd thing is that the domain.com has no entries in psa "spamfilter" table. When renamingit to domain.net it tries to populate the table and stops.
 
Have you tried to enable SpamAssassin first, then reconfigure the domain as it exists now (# plesk repair domain <domainname>) and then do the rename?
 
Hi Peter,
plesk repair domain <domainname> didnot work for me but I tried plesk repair web <domainname> and it checked the domain. No errors found. I tried repair all => #(plesk repair all -y -v. It checked all sorts and the result was:
Error messages: 0; Warnings: 0; Errors resolved: 0

Then restarted the server and tried renaming the domain. Again the message displayed:-
This operation is taking too long. Check the results in a few minutes.

But this time, panel.log has a different message:-
[13-Apr-2019 15:04:39 Europe/London] PHP Fatal error: Maximum execution time of 600 seconds exceeded in /usr/local/psa/admin/plib/vendor/plesk/zendframework/library/Zend/Db/Table/Abstract.php on line 391
[2019-04-13 15:04:39.094] ERR [1] ERROR: Maximum execution time of 600 seconds exceeded (Abstract.php:391)

In file Abstract.php :-
public function getRowClass()
{
return $this->_rowClass; /// line 391
}

I have searched google for "Maximum execution time of 600 seconds..", nothing relevant or useful.
Truly frustrating!!
 
I am sorry that I wrote the wrong command. Sometimes I am mixing things up, probably because of too much work to do. You are right that it is "plesk repair web ...".
 
No worries .. it happens to me all the time.

I was just wondering why it says " ... Check the results in a few minutes."

And does it mean to repeat the renaming attempt in few minutes? OR " . wait and see if it has accomplished the renaming process?".
 
The "check the results in a few minutes" is a standard phrase that appears when a task cannot be completed within a given threshold. It does not mean that the software is actually doing something. Most likely some process hangs, so that the job stays in the "longtasks" table. However, that only means it is listed there, but does not mean, that it is still running.

Renaming a domain cannot take 10 minutes or longer. There are some file and database operations that need to be done, but even under heavy load they cannot take that long. So it won't make much sense to change the timeout.

What you could try is to
1) Make sure that the database is consistent
# plesk repair db -y
2) Clear possibly hanging sw-engine processes by stopping sw-engine and removing leftover orphans
# service sw-engine stop
3) Then find running sw-engine processes (there should not be any, but there might be runaways)
# ps aux | grep sw-engine
and kill all of them.
# kill -9 <pid 1> <pid 2> <pid n>
It is thinkable that some are orphans, blocking the execution of other processes.
4) Then restart sw-engine
# service sw-engine start
Maybe this needs an sw-cp-server restart, too.

As I cannot tell you the root cause, this is only an attempt to solve the problem by curing the symptoms. Else you should consider to get official Plesk support.
 
Peter, I have tried all the steps you suggested - still the same wretched message is displayed.

As a last resort, I want to try this and see if it makes a difference. There are about 8000 emails + aliases used by domain.com, and for some reason the renaming fails when only about 4000 are populated in the spamfilter table. So, I will make a backup copy if the psa database, then delete all emails and aliases. restart the server and try renaming the domain. If it doesn't work I will try to get official Plesk support. If renaming works, then I will see if one could find a way of importing the psa database again.

Thank you very much anyway for your input.
 
Oh, wait. I did not think that someone could have so many e-mail addresses on a single domain in Plesk. In this case: If renaming a single one takes a second, renaming all will take 133 minutes. If there are so many addresses I can imagine that indeed the web server timeout occurs. Then try this first, please:
Follow the instructions in this case:
Unable to download huge backup file in Plesk interface: 504 Gateway Time-out
It is not describing your issue, but the solution presented is something you want to try.

Just add some more time, e.g. increase timeout not to 1200 seconds, but maybe 3600 or more. If it does not help, you can always reduce it again. But if you really have so many transactions to do, it is possible that a 600 second timeout (10 minutes) is insufficient. Sorry for that again, I did not consider that someone would have so many mailboxes on a single system.
 
I believe your suggestion will definitely work. But I need a bit of time to try it.

Before reading your message, I deleted all email entries from psa tables via ssh, repaired the database, restarted the server, tried renaming the domain. It worked like a breeze.

This proves that the problem lies with the large number of emails (timeout, etc).

Now I need to rename it back to what it was (domain.com), import the backed up psa db, then try your method.

I might be struggling a bit with importing the psa database, so it will take me time, but I will let you know the outcome.

I am almost certain that it will work. Many thanks.
 
Back
Top