DescriptionOne of my deployments has a wrapper script which regenerates additional_files.cfg on each run. The average size of this file is 4.5m (roughly 48,000 files/directories).
Runs occasionally fail due to the webhost's tweaking of php.ini .
- If safe_mode is enabled files then file_exists may return false
- The PHP memory limit may be hit
- Max execution time may also be hit
The first can only really be addressed by editing php.ini - although there are potential workarounds, they all feel a bit hacky.
The latter two can be addressed, so a bugfix should be developed.
Activity
2015-01-30 11:01:49
The overall memory usage could also probably be reduced by removing files from changedbinariesmain::files as they're checked.
Running a test update/check with the current changeset at the moment.
2015-01-30 11:03:14
Webhook User-Agent
View Commit
2015-01-30 11:03:15
Webhook User-Agent
View Commit
2015-01-30 11:13:14
Webhook User-Agent
View Commit
2015-01-30 11:21:16
2015-01-30 11:42:32
The changes in 1995c3e have had the expected effect - memory usage still climbs as the script progresses (it is, after all, still buffering notifications etc) but not as sharply as it did before.
The host does, however, have quite a low memory limit set for PHP (32M!) so commit f890c98 uses ini_set to up this limit to 256M (which should be more than enough!).
2015-01-30 11:43:14
Webhook User-Agent
View Commit
2015-01-30 11:45:00
Safe mode has since been disabled.
2015-01-30 12:02:13
2015-01-30 12:03:14
Webhook User-Agent
View Commit
2015-01-30 12:18:53
Generated with
Before
After
So memory usage has been reduced considerably - the run also completed in a shorter time. For reference, that run processed 52,278 hashes.
2015-01-30 12:25:14
Webhook User-Agent
View Commit
2015-01-30 12:25:21
2015-01-30 12:36:35
2015-01-30 12:36:35
2015-01-30 12:36:35
2015-01-30 12:36:39