logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache keeps restarting - Faulting module name: ntdll.dll
Author
nidjo5



Joined: 26 Jun 2017
Posts: 5

PostPosted: Mon 26 Jun '17 14:20    Post subject: Apache keeps restarting - Faulting module name: ntdll.dll Reply with quote

Hi everyone.

First of all, let me say thanks for everything you do - you work has been a big help for me.

But, I'm struggling with Apache server on productive server.
It keeps restarting every 5 - 10 minutes, depends on a workload.

Event Viewer:

Code:
Faulting application name: httpd.exe, version: 2.4.25.0, time stamp: 0x58550e9f
Faulting module name: ntdll.dll, version: 6.2.9200.21971, time stamp: 0x57c044e5
Exception code: 0xc0000374
Fault offset: 0x00000000000da5d5
Faulting process id: 0x2b34
Faulting application start time: 0x01d2ee730706b46d
Faulting application path: C:\webservices\apache24\bin\httpd.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 291f3849-5a67-11e7-942e-005056a20408



apache_error.log

Code:
[Mon Jun 26 13:06:07.043686 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00428: Parent: child process 6384 exited with status 255 -- Restarting.
[Mon Jun 26 13:06:07.121681 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00455: Apache/2.4.25 (Win64) PHP/7.1.5 configured -- resuming normal operations
[Mon Jun 26 13:06:07.121681 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 11:15:57
[Mon Jun 26 13:06:07.121681 2017] [core:notice] [pid 15068:tid 484] AH00094: Command line: 'C:\\webservices\\apache24\\bin\\httpd.exe -d C:/webservices/apache24'
[Mon Jun 26 13:06:07.121681 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00418: Parent: Created child process 4232
[Mon Jun 26 13:06:07.402486 2017] [mpm_winnt:notice] [pid 4232:tid 404] AH00354: Child: Starting 800 worker threads.

[Mon Jun 26 13:08:22.157594 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00428: Parent: child process 4232 exited with status 255 -- Restarting.
[Mon Jun 26 13:08:22.235788 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00455: Apache/2.4.25 (Win64) PHP/7.1.5 configured -- resuming normal operations
[Mon Jun 26 13:08:22.235788 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 11:15:57
[Mon Jun 26 13:08:22.235788 2017] [core:notice] [pid 15068:tid 484] AH00094: Command line: 'C:\\webservices\\apache24\\bin\\httpd.exe -d C:/webservices/apache24'
[Mon Jun 26 13:08:22.235788 2017] [mpm_winnt:notice] [pid 15068:tid 484] AH00418: Parent: Created child process 13600
[Mon Jun 26 13:08:22.500861 2017] [mpm_winnt:notice] [pid 13600:tid 404] AH00354: Child: Starting 800 worker threads.



Server configuration:

Code:
OS Name   Microsoft Windows Server 2012 Datacenter
Version   6.2.9200 Build 9200
System Manufacturer   VMware, Inc.
System Model   VMware Virtual Platform
System Type   x64-based PC
System SKU   
Processor   Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz, 2297 Mhz, 4 Core(s), 4 Logical Processor(s)
Processor   Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz, 2297 Mhz, 4 Core(s), 4 Logical Processor(s)
Processor   Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz, 2297 Mhz, 4 Core(s), 4 Logical Processor(s)
Processor   Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz, 2297 Mhz, 4 Core(s), 4 Logical Processor(s)
BIOS Version/Date   Phoenix Technologies LTD 6.00, 14.4.2014.
SMBIOS Version   2.4
Embedded Controller Version   0.00
BIOS Mode   Legacy
BaseBoard Manufacturer   Intel Corporation
BaseBoard Model   Not Available
BaseBoard Name   Base Board
Platform Role   Desktop
Installed Physical Memory (RAM)   16,0 GB
Total Physical Memory   16,0 GB
Available Physical Memory   9,86 GB
Total Virtual Memory   18,2 GB
Available Virtual Memory   12,8 GB
Page File Space   2,25 GB



Apache server:

Code:
Server Version: Apache/2.4.25 (Win64) PHP/7.1.5
Apache Lounge VC14 Server built: Dec 17 2016 11:15:57
Server loaded APR Version: 1.5.2
Compiled with APR Version: 1.5.2
Server loaded APU Version: 1.5.4
Compiled with APU Version: 1.5.4
Module Magic Number: 20120211:67
Hostname/port: myProductiveHost.com:80
Timeouts: connection: 60    keep-alive: 5
MPM Name: WinNT
MPM Information: Max Daemons: 64 Threaded: yes Forked: no
Server Architecture: 64-bit
Server Root: C:/webservices/apache24
Config File: C:/webservices/apache24/conf/httpd.conf
Server Built With:
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/apache"
 -D SUEXEC_BIN="/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error.log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


Note: I have OPCache extension up & running on PHP side.

Does anyone have some idea why this is happening?

I've tried setting up Apache & PHP to run as FastCGI, but that way everything is pretty slow (like OPcache is not working right). Also, php-cgi.exe processes were spawning like crazy and slowing down the server.

Problem described here: https://stackoverflow.com/questions/44329826/apache-2-4-php-7-1-5-fastcgi-opcache


So, I switched to mod_php .... which sometimes crash entire server (so hard restart is needed).

Please, help me....
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Mon 26 Jun '17 16:07    Post subject: Reply with quote

For mod_fcgid.so try this setting in your php.ini:
Code:
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=0
opcache.mmap_base=50000000
opcache.file_cache="c:\\temp"
opcache.file_cache_only=0
opcache.file_cache_fallback=1

I am using this on my dev server: Win2k8, Apache/2.4.26 (Win64) OpenSSL/1.0.2l-fips mod_fcgid/2.3.9 and PHP Version 7.1.7RC1 x64 NTS.
Back to top
nidjo5



Joined: 26 Jun 2017
Posts: 5

PostPosted: Tue 27 Jun '17 7:58    Post subject: Reply with quote

I don't know what is different from my last setup, but now OPcache seems to work. Rolling Eyes

Also, I've switched back to FastCGI because mod_php was eating all the RAM so we had to restart server twice yesterday.

Currently, FastCGI seems to be running fine with these setup:

Code:
FcgidMaxProcesses       150
FcgidMaxProcessesPerClass   150
FcgidIdleTimeout      10
FcgidBusyTimeout      300
FcgidProcessLifeTime            0
FcgidIOTimeout         120
FcgidIdleScanInterval   9
FcgidErrorScanInterval   9
FcgidZombieScanInterval   10
FcgidTimeScore         3


OPcache config:

Code:
opcache.file_cache            = "C:/webservices/php7.1.5/opcache_dir"
opcache.file_cache_only         = 0
opcache.file_cache_fallback      = 1
opcache.mmap_base             = 50000000
opcache.memory_consumption      = 128
opcache.interned_strings_buffer   = 8
opcache.max_accelerated_files   = 32531
opcache.max_wasted_percentage   = 40
opcache.use_cwd               = 1
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Tue 27 Jun '17 8:41    Post subject: Reply with quote

OK! It looks like you borrowed some of my opcache settings. Anatol Belski (known as weltling here and on github) originally set me on the right track. Sometimes opcache runs into shared memory ('SHM') problems on Windows.

You'll have to play around with file caching to overcome those problems. See
http://markmail.org/message/hhieta6jpzocnvll#query:+page:1+mid:cyq7g7fcibunrdr2+state:results
Anatol Belski wrote:
opcache.file_cache_fallback=1 implicitly activates opcache.file_cache_only=1 for a certain process only, that failed to attach to SHM. This is automatically on if opcache.file_cache is explicitly setup. That certain process will use file cache only until it exits, while still requiring a small part of SHM to be reattached.

Thus, it is always worthy to activate the file cache. While not being as fast as SHM, it'll significantly reduce failures due to SHM reattach issues on Windows, while still keeping speedup.
Back to top
nidjo5



Joined: 26 Jun 2017
Posts: 5

PostPosted: Tue 27 Jun '17 10:49    Post subject: Reply with quote

Yes, I added the line:

Code:
opcache.file_cache_only = 0


and changed line:

Code:
opcache.mmap_base = 0x20000000

into
Code:
opcache.mmap_base = 50000000


We'll see how long it will be running fine.... Smile

Tnx!
Back to top
nidjo5



Joined: 26 Jun 2017
Posts: 5

PostPosted: Wed 28 Jun '17 8:06    Post subject: Reply with quote

I said it too early... Sad
Tonight we had a deadlock that lasted an hour or so...

MyProductiveErrors.log:
Code:

[Wed Jun 28 00:02:59.045691 2017] [core:error] [pid 9300:tid 4624] [client 192.168.xxx.xx:3213] End of script output before headers: index.php, referer: http://myproductive.com/index
...
[Wed Jun 28 01:17:38.314067 2017] [core:error] [pid 9300:tid 652] [client 192.168.xxx.xx:57795] End of script output before headers: index.php, referer: http://myproductive.com/index


They said they wasn't able to work, that site was "loading" (mostly AJAX calls) all the time or was not available.

When I was able to connect to server, everything was running fine, so I was unable to see anything wrong with the server ( server-status, task manager, and so on)

Any idea what could be causing this error ?
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Wed 28 Jun '17 11:15    Post subject: Reply with quote

No idea. Try lowering FcgidIdleTimeout even more and setting FcgidProcessLifeTime.

Interesting table in https://wiki.mikejung.biz/Fcgid#FCGI_Considerations_for_Shared_Servers
Not everything is applicable, because it is another OS and another MPM, but it may be inspiring.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Fri 30 Jun '17 17:11    Post subject: Reply with quote

Any news on this one? Just curious if you've got it running.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 03 Jul '17 13:23    Post subject: Reply with quote

One Problem that I see is FcgidIdleTimeout
You kill an idle php-cgi process after 10 seconds. That might explain the wild spawning.

the Exception code: 0xc0000374 is a null pointer exception. IIRC I had such an error on one of my systems. The only solution was to use a thread safe version of PH. Even though using fcgid the the NTS version killed apache very often.
Back to top
nidjo5



Joined: 26 Jun 2017
Posts: 5

PostPosted: Tue 25 Jul '17 9:04    Post subject: Reply with quote

Hi.
I did not respond because I was on vacation.

Currently, my productive is running fine with this settings:

Code:
FcgidConnectTimeout                  16
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS   0
FcgidInitialEnv PHP_FCGI_CHILDREN      0

FcgidMaxProcesses          200
FcgidMaxProcessesPerClass   200

FcgidIdleTimeout      5
FcgidBusyTimeout      300
FcgidProcessLifeTime   0
FcgidIOTimeout         120

FcgidIdleScanInterval   9
FcgidErrorScanInterval   9
FcgidZombieScanInterval   10

FcgidTimeScore         3


We had to optimize a few reports, because (as it seems) they were killing our server...
Back to top


Reply to topic   Topic: Apache keeps restarting - Faulting module name: ntdll.dll View previous topic :: View next topic
Post new topic   Forum Index -> Apache