# Net::Http, end of file reached

**URL:** <https://www.ruby-forum.com/t/net-http-end-of-file-reached/176009>\
**Category:** Ruby\
**Created:** [September 23, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/net-http-end-of-file-reached/176009 "2009-09-23T16:53:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [September 23, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/net-http-end-of-file-reached/176009/1 "2009-09-23T16:53:50Z")

</div>

Hi, I’m working with Net::Http and I have to calculate a few things  
before I send some of the posts, the problem is sometimes it takes more  
than 10 seconds to calculate them and then I get the error: end of file  
reached. It seems like a time out…  
Is there any way to solve this?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [September 23, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/net-http-end-of-file-reached/176009/2 "2009-09-23T17:49:07Z")

</div>

Mario R. wrote:

> Is there any way to solve this?
> 
> Thanks a lot.

Check out AJAX and asynchronous processing …

10 seconds is an awfully long time for a user to wait for a response…

hth  
ilan

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [September 23, 2009, 6:11pm UTC](https://www.ruby-forum.com/t/net-http-end-of-file-reached/176009/3 "2009-09-23T18:11:59Z")

</div>

But I’m not wating from a response on the server… what it happens is  
that it takes more than 10 seconds between one post and another so I get  
this error on the second post.

Ilan B. wrote:

> Mario R. wrote:
> 
> > Is there any way to solve this?
> > 
> > Thanks a lot.
> 
> Check out AJAX and asynchronous processing …
> 
> 10 seconds is an awfully long time for a user to wait for a response…
> 
> hth  
> ilan
