Re: Re: Non Blocking write in apache

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

 



Hi Yann,
Please don't get confuse with Cygwin(Windows). I am running apache on NonStop(Tandem). I have put breakpoint at apr_poll() but it is not going there.

Few Events of writing :
1) apache writes 779 bytes to tomcat from apr_socket_sendv() function and writev functions returns success.
2) apache writes 24604 bytes to tomcat from apr_socket_sendv() function but writev function returns -1 with EWOULDBLOCK and it has timeout=0(because set in writev_nonblocking())
3) apache again tries to write 32796 to tomcat from apr_socket_sendv() function but writev function returns -1 with EWOULDBLOCK and it has timeout=0(because set in writev_nonblocking()).
4) apache again tries to write 40988 to tomcat from apr_socket_sendv() function but writev function returns -1 with EWOULDBLOCK and it has timeout=0(because set in writev_nonblocking()).
5) apache again tries to write 49180 to tomcat from apr_socket_sendv() function but writev function returns -1 with EWOULDBLOCK and it has timeout=0(because set in writev_nonblocking()).
6) After this I am getting 4022 error.

What is happening here that after 24604 bytes in step 2, apache is 8192 bytes in buffer till step 5 and then giving 4022 error. 
All timeouts has default value.

I am wondering that why is it not going into select() if writev is returning -1 with EWOULDBLOCK.
Why is it  failing after 49180 bytes. Does max size for this buffer is 49K??

I am able to upload same file if I am using blocking call. 
Please let me know if you need more information.

Thanks
Hemant


On Fri, Sep 14, 2018 at 3:56 PM Yann Ylavic <ylavic.dev@xxxxxxxxx> wrote:
Hi Hermant,

On Fri, Sep 14, 2018 at 8:08 AM Hemant Chaudhary
<hemantdude.chaudhary@xxxxxxxxx> wrote:
>
> I have tried to upload a file of 26.5mb on apache tomcat, which was successfull.
> I tried to proxy request to tomcat with same file. But get following error.
> Attaching the error_log.
>
> Can you please help me to understand where I am going wrong ?

I don't run Windows, sorry I'm no expert there, more questions than
answers below...
So apr_poll() returns APR_EINVAL, right?

What could be the reasons for poll() in cygwin to return EINVAL?
I don't know how cygwin implements poll(), but for instance I see that
WSAPoll() can return:
WSAEINVAL An invalid parameter was passed. This error is returned if
the fdarray parameter contains a NULL pointer. This error is also
returned if invalid flags were specified in the events member of any
of the WSAPOLLFD structures pointed to by the fdarray parameter when
requesting socket status. This error is also returned if none of the
sockets specified in the fd member of any of the WSAPOLLFD structures
pointed to by the fdarray parameter were valid.

What's the value of "timeout" for apr_poll() in send_brigade_blocking()?
Could you debug apr_poll() and see if something like the above happens
to the parameters passed to poll()?

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux