Perl threads and libwww wierdness

Rudolf Lippan rlippan at remotelinux.com
Wed Dec 14 16:35:31 GMT 2011


On Tuesday, December 13, 2011 at 08:16:04 PM, Toby Wintermute wrote:
> Hi,

Hi

> The 404 errors are reported on the distant webserver as well, for URLs
> that are definitely not 404. (as the identical URL is being requested
> successfully many times in the same period).
> 

The server should know why it is giving 404s. If it does not wish to share
with you...

> 
> The only reason I don't think this is a problem with the network or
> webserver is that the problems don't show up if I use fork() instead
> of threads. (On otherwise identical code; and the same overall
> throughput rates are reached. However the fork() version is just for
> that bit of code for testing this; it misses some functionality.)
> 

Just a small change performance characteristics can make a big difference
when you are pushing things.

I recently had a case where I optimized the network writes of a program and it
caused some major confusion at the firewall(statefull).  The driver program
had one core pegged, so there was no change in average throughput.


> It's also being a pain to try and replicate the threaded issue with a
> standalone server away from our code though, which isn't a good sign.

If you can, mirror a port on your switch and do a packet capture. That should
give you exactly what is going over the wire, and you don't have to trust
either system to tell you the truth.

-r






More information about the london.pm mailing list