0

I am experiencing a strange issue with php-fpm (7.0.33).

At random times it starts throwing errors like:

PHP message: PHP Fatal error: Uncaught Error: Call to undefined function untrailingslashit()

Restarting php-fpm fixes it. There is no specific request causing this behavior - it's just random.

Opcache settings:

opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 0 => 0
opcache.file_cache => no value => no value
opcache.file_cache_consistency_checks => 1 => 1
opcache.file_cache_only => 0 => 0
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.huge_code_pages => Off => Off
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 32 => 32
opcache.lockfile_path => /tmp => /tmp
opcache.log_verbosity_level => 2 => 2
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 256 => 256
opcache.optimization_level => 0x7FFFBFFF => 0x7FFFBFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 15 => 15
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_permission => Off => Off
opcache.validate_root => Off => Off
opcache.validate_timestamps => On => On

My best bet is that opcache memory is somehow getting corrupted during time, but even though I have put it to verbose logging - log is empty after crash.

For now I have disabled opcache and checking if it resolves the issue, but that's no ideal solution. Any help would be appreciated.

  • First, update to a currently supported PHP version. – Michael Hampton Mar 28 '19 at 18:43
  • @MichaelHampton thanks for your reply. While I agree with you that it needs to be done eventually, we are dealing with this problem for a long time (two different servers) - even when php 7.0 was still supported (it's not like we are using version 5 years old - it's deprecated since 3 months) :) I would definately switch to 7.1 or 7.2 if I was sure that this is a problem with php version and not setup values. – Arkadiusz 'flies' Rzadkowolski Mar 29 '19 at 18:54
  • The problem is that your PHP version is no longer supportable. If you had the problem for a long time, we have no way to know that! The time to get help with it is _before_ it goes out of support. – Michael Hampton Mar 29 '19 at 18:57
  • @MichaelHampton you are correct. I have done required updates to code & upgraded to most current 7.2 minor version. Will see if that helps. – Arkadiusz 'flies' Rzadkowolski Mar 30 '19 at 19:20

1 Answers1

0

We saw something similar. Undefined function errors, where the function was definitely there. Found eventually a nginx log message: fastcgi_buffer_size 4096 is not enough for cache key, it should be increased to at least 5120

Increasing the fastcgi_buffer_size in the nginx configuration resolved the issue