Apache server returns early before process is complete
Joseph He <[email protected]> Wed, 23 Apr 2025 09:21:12 -0500
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <CAD16sHv3LvFY9gMEKRynPsKGpMF8OvE_fcPN96MnytGN5XSTjQ@mail.gmail.com> |
--000000000000e46f88063372d0c2 Content-Type: text/plain; charset="UTF-8" All, good day. Here is the issue I have. My entire application is running on ModPerl/Apache environment. I send Http::Request with data load from my App server to a dispatch server thru LWP::UserAgent, I set the timeout 600 seconds. The dispatch server is supposed to manipulate the data and send the data to an external SFTP server. Because the SFTP can fail, it will keep trying up to 4 times with 30 seconds sleep in case that SFTP connection fails. Recently, I found that I uploaded the file twice sometimes. I figured out the root cause is that my Dispatch server returns 'failure' at 6 minutes while it keeps trying to do the SFTP. The App server received HTTP::Response with error status so it issued another call to send data. It turns out I uploaded the identified file twice. Anybody has this sort of experience? Why does the dispatch server return 'error' while it still processes the data? Thanks a lot, Joseph --000000000000e46f88063372d0c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">All, good day.<div><br><div>Here is the issue I have.</div= ><div>My entire application is running on ModPerl/Apache environment.=C2=A0= </div><div>I send Http::Request with data load from my App server to a disp= atch server thru LWP::UserAgent, I set the timeout 600 seconds.</div><div><= br></div><div>The dispatch server is supposed to manipulate the data and se= nd the data to an external SFTP server. Because the SFTP can fail, it will = keep trying up to 4 times with 30 seconds sleep in case that SFTP connectio= n fails.</div><div><br></div><div>Recently, I found that I uploaded the fil= e twice sometimes. I figured out the root cause is that my Dispatch server = returns 'failure' at 6 minutes while it keeps trying to do the SFTP= . The App server received=C2=A0HTTP::Response with error status so it issue= d another call to send data. It turns out I uploaded the identified file tw= ice.</div><div><br></div><div>Anybody has this sort of experience? Why does= the dispatch=C2=A0server return 'error' while it still processes t= he data?=C2=A0</div><div><br></div><div>Thanks a lot,</div><div>Joseph</div= ><div><br></div></div></div> --000000000000e46f88063372d0c2--