Link to home
Start Free TrialLog in
Avatar of bad3000
bad3000

asked on

How do I correct Application Errors in module php4ts.dll in Apache.exe?

I'm a Windows Server Administrator, but actually a client has a Apache for Windows in a Windows Server 2003 R2.

An event is registered in the application section of Event Viewer, when we got some concurrent users on a apache site (with php based applications):  

Tipo de suceso:      Error
Origen del suceso:      Application Error
Categoría del suceso:      (100)
Id. suceso:      1000
Fecha:            02/10/2007
Hora:            9:37:51
Usuario:            No disponible
Equipo:      DCSERVER2
Descripción:
Aplicación con errores: Apache.exe, versión: 2.0.50.0, módulo con error: php4ts.dll, versión 4.4.4.4, dirección de error 0x000c6aa2.

Para obtener más información, vea el Centro de ayuda y soporte técnico en http://go.microsoft.com/fwlink/events.asp.
Datos:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 41 70 61   ure  Apa
0018: 63 68 65 2e 65 78 65 20   che.exe
0020: 32 2e 30 2e 35 30 2e 30   2.0.50.0
0028: 20 69 6e 20 70 68 70 34    in php4
0030: 74 73 2e 64 6c 6c 20 34   ts.dll 4
0038: 2e 34 2e 34 2e 34 20 61   .4.4.4 a
0040: 74 20 6f 66 66 73 65 74   t offset
0048: 20 30 30 30 63 36 61 61    000c6aa
0050: 32                        2      

Where else i could find log information about this Windows Error.  Do you need any log?

Thanks in advance for your help
Avatar of theevilworm
theevilworm

You could look in the apache error log (this can be set in either the server config or VirtualHost definiton).
If the php ini setting log_errors is On then php errors are logged in the apache error log, but i suspect this is a segmentation fault in which case you might not find anything in the apache error logs.
php4 had a lot of bugs causing segmentation faults on windows threaded webservers (some of which i've encounter were related to  preg_match_all() and ereg_replace() or mb_ereg_replace() functions)

You should update to the latest release of php4 and see if the problem persists.

If you are running a publicly available/open source php application you could check out the community forums and see if anyone else has similar problems.

If it's a custom build php application ask the developer(s) to test using a debug build of php and webserver stress test tools.

As a short term fix, you could set ThreadsPerChild 1 for mpm_winnt.c. That will most likely stop the errors from occurring but it will affect performance during high concurrency. To regain some of the lost performance you could increase the MaxClients value but this approach will use more ram compared to threads.
Avatar of bad3000

ASKER

I've found this setting on the php.ini
;memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)

I'noticed that after 128MB Apache.exe also fails, it could happen?  I'm testing now with a Memory Limit of 512M

I'm new to php.ini settings.  Can you explain where are the files that i need to change and how i can set the MaxClients settings, a sample it's good, it's HEX o DEC, how can i write the MaxClient seting?

Greetings

BADBOY
ASKER CERTIFIED SOLUTION
Avatar of theevilworm
theevilworm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bad3000

ASKER

We actually downloaded and installed the php 4.4.7 but we need to wait until end-of-month processing to see if the application error ocurrs.

We set the memory limit to 48M on the previos month processing and we noticed that the number of times that the application error was reduced from 10 by day to just once or two by day.

I didn't review the logs yet, we'll wait until this month processing, we enabled the logs as you instructed.  So we are testing, we'll use the stress tool tonight

Greetings

BADBOY