php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71353 Missing documentation about opcache.mmap_base
Submitted: 2016-01-12 18:39 UTC Modified: 2016-01-16 11:59 UTC
Votes:3
Avg. Score:3.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: brjann at gmail dot com Assigned:
Status: Open Package: opcache
PHP Version: 7.0.2 OS: Windows Server 2008 R2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: brjann at gmail dot com
New email:
PHP Version: OS:

 

 [2016-01-12 18:39 UTC] brjann at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/opcache.configuration
---

The documentation about opcache.mmap_base runtime configuration is insufficient and it is difficult to find other sources on the web.

I've had repeated and intermittent problems with Server Error 500 with the message that FastCGI exited unexpectedly with error code 0xFFFFFFFE. Googling this did not help. The Event Viewer in Windows revealed that it was OpCache that crashed with error 487. Further googling got me here
https://support.zend.com/hc/en-us/articles/203838576-Zend-Enabler-Error-Could-not-locate-a-free-PHP-process-

Although the error message was not relevant i tried setting opcache.mmap_base = 0x20000000 as suggested.

The error has since then disappeared.

It would be useful if this was stated in the documentation to save other PHP users time.

Best wishes,
Brjánn Ljótsson


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-14 10:38 UTC] mattficken@php.net
To clarify, you have a PHP process that exits immediately on startup? or sometime later? With 0xFFFFFFFE?

Do you have several processes exiting at about the same time?


Opcache.mmap_base directive is to deal with an issue we fixed in 7.0.x where PHP exits immediately on startup with 0xC000005.

I want to be sure that issue hasn't reappeared.

Since that issue is fixed, we don't need opcache.mmap_base directive documentation.

But since you asked, opcache.mmap_base directive is Memory Address that needs to be free in all the php processes using opcache.


Your issue sounds like a separate issue from what opcache.mmap_base directive is for helping with...
 [2016-01-14 15:53 UTC] brjann at gmail dot com
Thank you for the response.

The error did not occur at startup but happened intermittently, about 15 times in 7000 page loads. They seemed somewhat clustered in time but still several minutes apart.

Since I set the opcache.mmap_base = 0x20000000 (a week ago) there have been no more OpCache crashes with error code 487 in the Event Viewer.

When googling Opcache error 487, there are two suggestions to change the mmap_base

https://github.com/zendtech/ZendOptimizerPlus/issues/167
https://bugs.php.net/bug.php?id=64926&edit=1

Best wishes,
Brjánn Ljótsson
 [2016-01-14 20:46 UTC] mattficken@php.net
Hmm...

What extensions are you using? just builtin extensions/DLLs or PECL?

What are the opcache.* INI directives you are using?

Which PHP build are you using (fe PHP-7.0.0-NTS-X64-VC14)? (the name of the .zip file you downloaded from windows.php.net)

For those 15/7000 page loads, was that load generated quickly within a few minutes, or did that take longer(hours, days)?

What is the value for the PHP_FCGI_MAX_REQUESTS setting?

That determines how many requests a PHP process will handle before its replaced/recycled.
 [2016-01-16 11:59 UTC] brjann at gmail dot com
Se answers below:

> What extensions are you using? just builtin extensions/DLLs or PECL?
Only DLLs
- GD2
- Multi-Byte String
- MySQL
- OpenSSL
- SOAP
- Tidy
- curl

> What are the opcache.* INI directives you are using?

opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=64
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=7693
;opcache.max_wasted_percentage=5
;opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=0
;opcache.revalidate_path=0
;opcache.save_comments=1
opcache.fast_shutdown=1
;opcache.enable_file_override=0
;opcache.optimization_level=0xffffffff
;opcache.inherited_hack=1
;opcache.dups_fix=0
;opcache.blacklist_filename=
;opcache.max_file_size=0
;opcache.consistency_checks=0
;opcache.force_restart_timeout=180
;opcache.error_log=
;opcache.log_verbosity_level=1
;opcache.preferred_memory_model=
;opcache.protect_memory=0
;opcache.restrict_api=
opcache.mmap_base=0x20000000
;opcache.file_cache=
;opcache.file_cache_only=0
;opcache.file_cache_consistency_checks=1
;opcache.huge_code_pages=1

> Which PHP build are you using (fe PHP-7.0.0-NTS-X64-VC14)? 
php-7.0.1-nts-Win32-VC14-x64

> For those 15/7000 page loads, was that load generated quickly within a few minutes, 
> or did that take longer(hours, days)?
It was 7000 loads during one whole day

> What is the value for the PHP_FCGI_MAX_REQUESTS setting?
Set to 10000 according to instructions on http://php.net/manual/en/install.windows.iis7.php

Best wishes,
Brjánn Ljótsson
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 19:01:44 2019 UTC