Re: xinetd vs php socket server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





I have a machine with several websites one of which is quite busy
this time of year.  I have another that had its joomla comments on
and open and the spammers found it.  They managed to get 700,000
comments into the system before we caught it, but the traffic and strain
on the MySQL server and the webserver (PHP) while it was going on brought
the server to its knees.  I've put some iptables rules in to block
the attacks and things are back to normal.

The server (A vmware
VM w/ 2 CPU and 2 GB of RAM) never crashed, but it certainly was on its
knees.  The distribution is Gentoo 10.1.

My only other
problem is PHP hanging on MySQL returning an emtpy set.(mysql_num_rows =
0).  That 's a whole other issue and off of this topic.

--C

Bostjan Skufca wrote:
> "It works pretty
well until its under attack by the spammers."
> 
>
Can you elaborate/explain further?
> 
> b.
> 
> 
> On 29 March 2011 01:14, Curtis Maurand
<curtis@xxxxxxxxxxx> wrote:
> 
>>
>>
>> Nathan Nobbe wrote:
>> > On Mon,
Mar 28, 2011 at 3:34 PM, Bostjan Skufca <bostjan@xxxxxx>
>> wrote:
>> >
>> >> If you need
high performance you probably already know that it will
>>
be
>> >> very
>> >> expensive CPU wise
if workers are spawned on each request. If you
>> don't,
>> >> I
>> >> would not bother with daemon
and just use xinetd. You can always add
>> >>
daemon-handling stuff later on.
>> >>
>>
>> Well I do hope you find a good working solution with as little
>> >> inconvenience as possible,
>> >>
b.
>> >
>> >
>> > hmm, wouldn't
both the solutions most likely be forking? php daemon
>>
would
>> > fork since threading isn't supported, and xinetd,
probly best to have
>> it
>> > fork for the same
reason apache is typically configured to fork.
>> right?
>>
>> Speak for yourself.  I've always configured my
systems to thread.  Since
>> IBM rewrote the threading library
several years back (NPTL), Theading
>> works.  I use the
threading version of apache and threading is enabled
>> in
>> PHP.
>>
>> It works pretty well until its
under attack by the spammers.
>>
>> --Curtis
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux