[ZBX-8851] unlimited execution and input time considered unsuitable Created: 2014 Oct 03  Updated: 2017 May 30  Resolved: 2014 Oct 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.5.0
Fix Version/s: 2.5.0

Type: Incident report Priority: Trivial
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: limits, php
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

set max_execution_time and max_input_time to -1 (unlimited).
frontend complains that this is not enough and wants 300 seconds instead



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 07 ]

Actually, to set "max_execution_time" to unlimited it must be set to 0.

Comment by richlv [ 2014 Oct 07 ]

right, but -1 is a valid value and a fairly long period just short of "forever"

Comment by Krists Krigers (Inactive) [ 2014 Oct 08 ]

Fixed in r49690, branch svn://svn.zabbix.com/branches/dev/ZBX-8851 (copy of trunk).

Comment by Ivo Kurzemnieks [ 2014 Oct 15 ]

(1) String changes?

kristsk No string changes. RESOLVED.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Oct 15 ]

(2) "max_input_time" is allowed to be 0 and -1. 0 = infinite and -1 = equivalent to maximum, but 0 is treated as zero. Unsure if that means infinity, but some sources say it is. It's not officially documented. Also not officially documented that "max_execution_time" can be -1 and it actually means aproximate infinity.

kristsk
Checked PHP source [1] to see how this setting is used internally and it looks like value of "max_input_time" is used in struct that is passed as 2nd argument to setitmer(2) [2]. wiper suggested that in case value of "max_input_time" is 0, the timer is removed and there is no limit for input time. Added "0" as a valid value in "max_input_time" validation.

[1] http://lxr.php.net/xref/PHP_5_6/Zend/zend_execute_API.c#1381
[2] http://linux.die.net/man/2/setitimer

RESOLVED in r49955.

wiper the timer is disabled on Linux platforms, on Solaris, BSDs and probably others it's equivalent to gettimer() call (don't ask what's happening if the third parameter is also NULL).

iivs After long discussions, decided to leave both values0 and -1 for both directives.
CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Oct 15 ]

(3) Coding style:

kristsk RESOLVED in r49947.

iivs Please, be careful what you merge. Remove [ in hosts.php first line.
And add missing parenthesis in CFrontendSetup.php:L171,L190
Also add comment in code why used 0 and -1 in both cases.

REOPENED.

kristsk RESOLVED in r50016.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Oct 21 ]

TESTED

Comment by Krists Krigers (Inactive) [ 2014 Oct 22 ]

Merged to 2.5.0 (trunk) in r50080.

Comment by Krists Krigers (Inactive) [ 2014 Oct 22 ]

(4) Updated documentation:

sasha I removed the changes in https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages.

CLOSED

Generated at Fri Apr 19 22:43:09 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.