• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jakarta Commons Httpclient multi-threading problem

 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a client which is able to create multiple threads, each thread sends a POST. I am able to run up to 50 threads with out a problem with my current version of the client. I want to use Httpclient but this version of the client code give an error which says:

I don't generate this error and don't know where it is coming from, or what is generating it. The threads write their output to output files, each thread has its own output file. I get one of these errors for each thread I run over 10. So if I run 15 threads I get 4 of these messages. The only major differance between the two versions of the clients is the Httpclient code. The other strange thing is that all of the threads run successfully, and the output files contain the correct data.
 
William Barnes
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears I was not using the "multithreaded" connection manager. The default connection manager don't do multithreading good.
Jakarta Commons Httpclient MultithreadedHttpConnectionManager documentation
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic