# Maximum PHP script run time - always reset to 300 after a while

**URL:** <https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178>\
**Category:** Virtualmin\
**Created:** [October 17, 2026, 12:33pm UTC](https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178 "2026-10-17T12:33:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lawk](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/l/dbc845/32.png) [@lawk](https://forum.virtualmin.com/u/lawk)\
**Post date:** [October 17, 2026, 12:33pm UTC](https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178/1 "2026-10-17T12:33:15Z")

</div>

I have had this issue forever.

After a while this setting gets reset to 300:

`Maximum PHP script run time`

I always have to reset it to 0 around 3 times per year. I dont know where this override is coming from.

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [October 20, 2026, 7:21am UTC](https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178/2 "2026-10-20T07:21:29Z")

</div>

@lawk From the information you have given it is not possible to work out what the issue is, let alone a fix 😃

Maybe revisit this with a lot more information.

---

<div class="post-metadata">

**Author:** ![lawk](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/l/dbc845/32.png) [@lawk](https://forum.virtualmin.com/u/lawk)\
**Post date:** [October 20, 2026, 8:58am UTC](https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178/3 "2026-10-20T08:58:51Z")

</div>

It is a GUI setting in Virtualmin. Web configuration → PHP Options.

there you can set it to unlimited or a second value.

I have it set to unlimited but for some reason it gets set to 300 seconds several times per year.

I have no idea what triggers it.

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [October 20, 2026, 11:56am UTC](https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178/4 "2026-10-20T11:56:29Z")

</div>

no-one can answer this for you wih this little information

- no version numbers (Virtualmin/Webmin)
- is it just one website
- is it after an update (probably)
- is it just one php version
- is it just the one website
- is it php-FPM
- does the value get reflect in the actual website site (i.e. php\_info())
- check the relevant `php.ini/user.ini` does not have syntax error in it.

Look for all instances of the `max_execution_time` and set each one to a slightly different number (eg: 61, 62, 63 or 301, 302, 303) eventually you will find out which one is causing the override because when the override happens you can see the unique number that has been used and therefore the `ini` file that it was pulled from.

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [October 20, 2026, 12:17pm UTC](https://forum.virtualmin.com/t/maximum-php-script-run-time-always-reset-to-300-after-a-while/138178/5 "2026-10-20T12:17:16Z")

</div>

TBF it’s answerable @lawk has an issue with their PHP configuration changing, it’s true we don’t know if this is system wide of per domain  
if system wide

- check the last modification date of the file
- with that data check the package manager logs to see if an update to PHP was made around/before that time
- if there is a webmin/virtualmin log (IDK) check if the file was modified & perhaps by whom

if per domain

- is there a script running that adjusts the settings to suit it’s requirements & restatting PHP

We don’t know in which mode php is running with and as you say there has not been enough information given to diagnose what’s going on so from that point just blame virtualmin/webmin for doing the modifications where I doubt this issue has anything to do with virtualmin/webmin
