Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Simultaneous request using threading

by stiller (Friar)
on Apr 11, 2008 at 07:50 UTC ( #679632=note: print w/replies, xml ) Need Help??

in reply to Simultaneous request using threading

- Is threading the appropriate tool to use or should I use fork instead?
I tend to prefer fork, but threads might be ok

if the server's maximum number of simultaneous requests is set to 10, If the script is not interrupted I should not be able to access the server using my browser right?
No. The server will serve up to ten requests at any time. But it won't take long to serve login.php, and once it's done with that, a slot is freed, for the next request to come in. You with a browser, or your 10-thread script might be the next to be served.

- Memory wise, is there any way I can alleviate the memory usage?
If you think your threaded script use much memory, try with forking. I think that forking usually consumes less memory, but I don't know if that is universally true, or if it's improved in 5.10
  • Comment on Re: Simultaneous request using threading

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://679632]
and one hand claps...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-10-22 10:32 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (273 votes). Check out past polls.