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 times out when multiple vhosts are in place
Author
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Tue 21 Apr '15 21:22    Post subject: Apache times out when multiple vhosts are in place Reply with quote

Hey guys,

Before I had a problem when I had multiple (at least 5) vhosts set to Apache when it just hanged, this was fixed adding:

Code:
Acceptfilter http none
Acceptfilter https none


To my httpd.conf, but now it's not hanging, it just times out, I get no error, nothing in the error.log file, it just times out.

After doing a refresh, it comes back like nothing happened.

Any ideas?

Thanks.
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 226
Location: Denver, CO USA

PostPosted: Wed 22 Apr '15 7:42    Post subject: Reply with quote

I run 4 VHosts, and have no hangs.

Did you add all of these lines to your httpd.conf?

AcceptFilter http none
AcceptFilter https none
EnableSendfile off
EnableMMAP off

-S
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Wed 22 Apr '15 14:59    Post subject: Reply with quote

EnableSendfile and EnableNMAP are off, also, it does this when somebody is browsing a newly added vhost, when nobody is brwosing the newly added vhost it's fine.
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 226
Location: Denver, CO USA

PostPosted: Wed 22 Apr '15 15:06    Post subject: Reply with quote

My next questions would be:

Are you on a Windows server or Linux server?

Is it a particular vhost or any vhost that is causing the performance issue?

-S
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Wed 22 Apr '15 17:27    Post subject: Reply with quote

Windows and it didn't have this before I added a new vhost.

The new vhost is setup exactly the same way as all the others and it's running the same kind of scripts as all the others (PHP w/MySQL database)

I'm using Apache 2.4.9 x64 with PHP 5.6.7 x64 and MariaDB 10.10 (WAMP server)
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 226
Location: Denver, CO USA

PostPosted: Wed 22 Apr '15 19:27    Post subject: Reply with quote

You mentioned, "same kind of scripts." I take it they are not the same exact scripts as those in the other VHosts?

With that in mind, could you disable the VHost that is causing issues for a short period of time to see if that resolves the issue?

Also, you mentioned that nothing shows in the logs? Are you looking solely at the logs for Apache? Have you looked for anything in the event view for windows?

What about Task Manager? Is the Apache process consuming excessive memory and/or CPU utilization?

These are just some of my ideas. If it is a DB or PHP script issue, then it starts to get beyond my scope of knowledge. Maybe our resident admins/gurus, Gregg, James or Steffen might have some ideas?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 22 Apr '15 21:27    Post subject: Reply with quote

2.4.9 huh, you may never find anything in your logs. If you're running mod_deflate someone may be using CVE-2014-0118 (fixed in 2.4.10) against you. I'm not saying anyone is but it's a possibility. If it showed up in the logs would simply look like a legitimate request in the access log, probably would not show in the error log and may show in the Event Viewer but not stating anything usable to know what was going on.

You are using AcceptFilter protocol none which is published as a workaround for CVE-2014-3523 (fixed in 2.4.10) but who knows if it's a perfect workaround.

Again, I'm not saying anyone is using these against you, it's just a possibility since you have not upgraded your Apache in over a year. You're pretty up-to-date with your php so you've been upgrading it, why not Apache too?

It's hard to say. Is this new vhost a somewhat popular host that was moved from another server?
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Fri 24 Apr '15 20:54    Post subject: Event Viewer Reply with quote

Event Viewer is showing an error in Apache, here it is:

Code:
Faulting application name: httpd.exe, version: 2.4.9.0, time stamp: 0x53258cd5
Faulting module name: php_mbstring.dll, version: 5.6.7.0, time stamp: 0x550b4e16
Exception code: 0xc0000005
Fault offset: 0x0000000000003e7b
Faulting process id: 0x2078
Faulting application start time: 0x01d07ebfa76914f9
Faulting application path: D:\Apache24\bin\httpd.exe
Faulting module path: D:\PHP\ext\php_mbstring.dll
Report Id: ef5dda18-eab2-11e4-afe1-00155d003b04


I guess I'm going to have to file a bug with PHP and their mbstring extension.

Thanks.
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Fri 24 Apr '15 21:21    Post subject: Reply with quote

I did put a bug in PHP, but I just tested the same script (osTicket) on my own machine (without multiple vhosts) and it did not make Apache restart/crash.

The only difference besides the vhosts is that I have a newer version of Apache, where it crashes it's Apache 2.4.9, I have 2.4.12

Do you think that might still be an Apache problem?
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Mon 27 Apr '15 15:04    Post subject: Reply with quote

I updated Apache to 2.4.12 and it still happens, so I now have both Apache and PHP the latest version and both have been notified of the problem, any ideas what I can do?

Thanks.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 28 Apr '15 1:41    Post subject: Reply with quote

Well, I'm not a very php informed person. I will say your Apache bug report will probably be closed as invalid because it's a php extension causing the problem. Usually caused by some specific code in your php script itself (someone jump in if I'm incorrect here).
Back to top
James Blond
Moderator


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

PostPosted: Tue 28 Apr '15 11:18    Post subject: Reply with quote

it says "php_mbstring.dll" crashes your apache. So some mb_* function causes that. If you can't disable that you might use php over mod_fcgid
Back to top
Jan-E



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

PostPosted: Tue 28 Apr '15 14:00    Post subject: Reply with quote

What happens if you define multiple vhosts on your local machine? Does it crash?

If so, could you try the same setup with the x86 Apache and PHP?

BTW In https://bugs.php.net/bug.php?id=69528 you suggest to install osticket and run it. That is a package with about 280 lines in it with 'mb_'. If you want the PHP devs to help you, you will have to dig a lot deeper and provide a really small reproducible script.
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Thu 30 Apr '15 19:02    Post subject: Reply with quote

I just wanted to cover all the bases, I notified everybody, Apache, PHP and osTicket, to see if we can work together and solve it.
Back to top


Reply to topic   Topic: Apache times out when multiple vhosts are in place View previous topic :: View next topic
Post new topic   Forum Index -> Apache