Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zend.opcache: Warning Internal error: wrong size calculation #14625

Open
HannahVernon opened this issue Jun 21, 2024 · 2 comments
Open

zend.opcache: Warning Internal error: wrong size calculation #14625

HannahVernon opened this issue Jun 21, 2024 · 2 comments

Comments

@HannahVernon
Copy link

Description

zend.OPCache on PHP 8.3.8 NTS on Win32 is throwing the following error repeatedly, even after clearing the cache:

Warning Internal error: wrong size calculation: C:\path-to-cache\cache\docket-cache\93da65a9fd00-b287b31d338a.php start=0x000002c2ee401040, end=0x000002c2ee472590, real=0x000002c2ee468e30

The 93da65a9fd00-b287b31d338a.php file is listed as zero size in the cache folder. Deleting the file results in opcache recreating it, again with zero size.

The php.ini section dealing with opcache settings:

[opcache]
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=2
opcache.revalidate_path=0
opcache.save_comments=1
opcache.record_warnings=0
opcache.enable_file_override=1
opcache.optimization_level=0x7FFEBFFF
;opcache.dups_fix=0
;opcache.blacklist_filename=
;opcache.max_file_size=0
;opcache.consistency_checks=0
opcache.force_restart_timeout=180
opcache.error_log=C:\windows\temp\php_opcache_err.log
opcache.log_verbosity_level=2
;opcache.preferred_memory_model=
;opcache.protect_memory=0
;opcache.restrict_api=
;opcache.mmap_base=
;opcache.cache_id=
opcache.file_cache=C:\windows\temp\php_op_cache
;opcache.file_cache_only=0
;opcache.file_cache_consistency_checks=1
opcache.file_cache_fallback=1
;opcache.huge_code_pages=1
;opcache.validate_permission=0
;opcache.validate_root=0
;opcache.opt_debug_level=0
;opcache.preload=
;opcache.preload_user=
;opcache.file_update_protection=2
;opcache.lockfile_path=/tmp

PHP Version

PHP 8.3.8 NTS Win32 x64

Operating System

Windows Server 2022 Standard 21H2, build 20348.2527

@iluuu1994
Copy link
Member

Hi @HannahVernon! Can you reproduce the warning with a small script? Otherwise, it will be very hard to diagnose the issue.

@HannahVernon
Copy link
Author

The file it is currently reporting as problematic is:

c90c7b354245-f3472753e77b.zip

This is the error around that particular file:

Sat Jun 22 17:56:29 2024 (10096): Warning Internal error: wrong size calculation: C:\path-to-file\docket-cache\c90c7b354245-f3472753e77b.php start=0x0000022afa0e7ec0, end=0x0000022afa0e8a28, real=0x0000022afa0e88f8

Contents of the file are:

<?php 
return array (
  'timestamp' => 1719096989,
  'site_id' => 1,
  'group' => 'term-queries',
  'key' => 'get_terms:c8817434f2120651a8ea3b4f240431ab:0.37558700 1719092969',
  'type' => 'array',
  'timeout' => 1719183389,
  'data' => 
  array (
    0 => 
    (object) array(
       'term_id' => 10,
       'object_id' => 3,
    ),
    1 => 
    (object) array(
       'term_id' => 13,
       'object_id' => 3,
    ),
    2 => 
    (object) array(
       'term_id' => 12,
       'object_id' => 3,
    ),
    3 => 
    (object) array(
       'term_id' => 11,
       'object_id' => 3,
    ),
  ),
);
/*@DOCKET_CACHE_EOF*/

Unfortunately I'm quite new to opcache, so I'm not entirely sure how to test that file, or indeed if the problem is with WordPress' Docket Cache plugin itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants