Page 1 of 2

phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 11:33
by Zoltan
Hello,

I've an sql file which is always failed to import because of phpmyadmin timeout.
How to increase timeout in phpmyadmin? I really can't find phpmyadmin config file on debian server.

thank you

Zoltan

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 12:36
by Tobi
Phpmyadmin ist not the first choice for large SQL-imports.

Better try bigdump.
https://www.ozerov.de/bigdump/

This one works perfectly with huge imports.

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 14:38
by Martin
Hello,

i would recommend using shell for large imports.

mysql -u USERNAME -p DATABASE < DUMPFILE.sql

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 14:45
by Zoltan
This import is not really "large". File size without compression is only 32MB
The VPS itself not the strongest but enough powerful for this "small/large" database: has 2cpu cores and 2GB RAM, no any other website or task running on it.
That is why I try to increase timeout. I think +30 seconds will be more than enough.

Edit: anyway I receive 504 gateway timeout at phpmyadmin import.

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 15:42
by Tobi
Large is relatively 😂.

Anyway, it will work on command line as Martin suggested or with the script I linked.

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 15:47
by Zoltan
Okay, but the problem is my costumer has no any idea about how to use ssh...
So made this question out of this problem.
How to increase phpmyadmin time limits just for fun? :)

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 17:30
by Martin
Hello,

the phpmyadmin values comes from the KeyHelp FPM Pool itself. These can be found within /etc/php/7.2/fpm/pool.d/keyhelp.conf

After changes, php7.2-fpm service needs to be restarted.

Re: phpmyadmin increase timeout limit

Posted: Wed 8. Apr 2020, 17:33
by select name from me;
Zoltan wrote: ↑Wed 8. Apr 2020, 11:33 I've an sql file which is always failed to import because of phpmyadmin timeout.
How to increase timeout in phpmyadmin? I really can't find phpmyadmin config file on debian server.
Sometimes it works, if you prepend this line (start of the file) ...

Code: Select all

SET AUTOCOMMIT = 0;SET FOREIGN_KEY_CHECKS=0;
... and append this line (end of the file) ...

Code: Select all

SET FOREIGN_KEY_CHECKS = 1;COMMIT; SET AUTOCOMMIT = 1;
... to your sql dump. The import will be much faster.

Re: phpmyadmin increase timeout limit

Posted: Fri 21. May 2021, 15:58
by Szektor
Martin wrote: ↑Wed 8. Apr 2020, 17:30 Hello,

the phpmyadmin values comes from the KeyHelp FPM Pool itself. These can be found within /etc/php/7.2/fpm/pool.d/keyhelp.conf

After changes, php7.2-fpm service needs to be restarted.
Thanks. I found some php_admin_value parameters here but there is no default setting for timeout.
How can we add one here properly?

Re: phpmyadmin increase timeout limit

Posted: Fri 21. May 2021, 16:04
by Florian
Hallo,

the first time related setting is the max_execution _time in the PHP-FPM Pool

The second one is the PHP-FPM timeout in /etc/apache2/keyhelp/keyhelp.conf

Code: Select all

<Proxy fcgi://keyhelp_keyhelp.socket>
        ProxySet connectiontimeout=5 timeout=120
    </Proxy>
Changes have to be done in both places. But they will be changed back with the next Keyhelp Update.

Re: phpmyadmin increase timeout limit

Posted: Fri 21. May 2021, 16:30
by Szektor
In this case is that possible to increase these limits by default?
I guess it wouldn't be a serious security concern to raise this to 60 minutes.
Also increasing execution time and file sizes + memory limits for phpMyadmin would be great.
I guess I am not the only one that have clients completely unaware of ssh.
This could be a huge time saving for all of us.

Re: phpmyadmin increase timeout limit

Posted: Fri 21. May 2021, 16:52
by Alexander
Szektor wrote: ↑Fri 21. May 2021, 16:30 I guess it wouldn't be a serious security concern to raise this to 60 minutes.
If you think these values are fine, than sure, adjust them as you like, but i would argue that the majority of admins would not increase this setting up to 60 minutes. But hey, everybody can edit the mentioned config files as he/she like ;).

But they will be changed back with the next Keyhelp Update.
This is not necessarily be the case. So changing the values in the files will be fine and will remain after KeyHelp updates.

Re: phpmyadmin increase timeout limit

Posted: Mon 24. May 2021, 16:25
by Szektor
Ok, thanks for these.
So I change:
1, /etc/php/7.2/fpm/pool.d/keyhelp.conf
2, /etc/apache2/keyhelp/keyhelp.conf
3, Now I am only missing a value for phpmyadmin admin timeout. I would increase that from 20 minutes to 60.
How can I add a php_admin_value for that? Since there is no default value for that.
(I guess there must be a naming for it but I might be wrong.)

Re: phpmyadmin increase timeout limit

Posted: Tue 25. May 2021, 09:20
by Alexander
Like Florian already told you, the value is called "max_execution_time".

There is no timeout value solely for phpMyAdmin, this is not how PHP works.

"max_execution_time" is a general value for all vhosts using this particular PHP-FPM pool file, which are:
- KeyHelp
- KeyHelp webmail tools (Roundcube / Rainloop)
- KeyHelp database administration tools (phpMyAdmin / Adminer)

Re: phpmyadmin increase timeout limit

Posted: Tue 25. May 2021, 11:18
by IchBins
Vielleicht hilft viewtopic.php?f=5&t=10149 weiter.