Problem/Motivation

See #2495411-143: Make simpletest fail a test when it detects pages that need more than 64MB and below.

From https://drupal:drupal@mixologic-ci-drupal.redesign.devdrupal.org/opcache... it looks like opcache.max_accelerated_files is set to 2000.

This means a real limit of 3,907 according to the opcache documentation.

The same report says that opcache is 'full' with 3,905 files cached. This is resulting in high memory usage on the bots.

Proposed resolution

Increase the number, probably to 10000 or so to be safe.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

catch created an issue. See original summary.

catch’s picture

Issue summary: View changes
effulgentsia’s picture

If on https://mixologic-ci-drupal.redesign.devdrupal.org/opcache.html, you click through to the "Scripts" tab, you'll see that a lot of those files are compiled twig files from different test runs (different test ID directories). If the opcache isn't cleared between test runs, then is there any setting of max_accelerated_files that won't fill up? Is there a way to clear the opcache between test runs without restarting the web server?

amateescu’s picture

We could do a opcache_reset() in tearDown()...

catch’s picture

I thought PIFR did an apache restart after each full test run.

Isn't this due to concurrency? If you have 8 or 16 tests running at a time, that's 8 or 16 * $templates_in_core plus the container.

Wim Leers’s picture

This was deployed accidentally for all newly launched testbots in the last 24 hours and ended up causing a day full of fails for D8: #2552687-16: Test failures in ConfigFormOverrideTest and ContainerRebuildWebTest on newly spun up testbot instances.

cilefen’s picture

Doesn't increasing max files impact how much RAM you must allocate?

catch’s picture

There was plenty of spare RAM in the report above, but if there's a significantly higher number of files that need caching, then that might have got maxed out yes.

Mixologic’s picture

Project: Drupal.org Testbots » DrupalCI: Test Runner
Status: Active » Needs review

Okay, found a big boo boo with opcode cache settings - the default is to only rescan and recompile a changed php file if it is older than 2 seconds. Which during a test is a lifetime. We ran into a bunch of other issues with the drupalci bots, so we're dropping that setting to 0, which means if you change a php file it should get recompiled.

This is probably what led to all of the breakages last time we set this setting to be higher - because the opcode cache is not an LRU cache (it fills up and just continuously recompiles any further files), we were hitting that 2000 limit and everything else was afterwards was always compiled.

With this set to 0, we should be able to push this back up to 100000 (the max) and not have to worry about the files not working.

basic’s picture

Status: Needs review » Reviewed & tested by the community
Mixologic’s picture

Well... actually ... The 100000 max files got deployed yesterday. Please let us know if things are still broken. They do not appear to be from what we can see.

isntall’s picture

Status: Reviewed & tested by the community » Fixed
Wim Leers’s picture

Hurray!

cilefen’s picture

Doesn't increasing max files impact how much RAM you must allocate?

I thought this was a Drupal core issue when I wrote that. Carry on...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.