Re: Apache server returns early before process is complete
Andreas Mock <[email protected]> Wed, 23 Apr 2025 16:31:43 +0200
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
Hi Joseph, your description is very vague, so can only answer on some assumptions: It sounds like a timeout is fired somewhere. Best advice in these situations: Log as many steps as you can. Keep your= =20 eyes open on TCP/IP and higher level timeouts. Declare only ONE instance responsible for a retry: Either the app server= =20 calling the dispatcher with several tries or the dispatcher trying for=20 himself. Not both. Best regards Andreas Am 23.04.2025 um 16:21 schrieb Joseph He: > 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=20 > server thru LWP::UserAgent, I set the timeout 600 seconds. > > The dispatch server is supposed to manipulate the data and send the=20 > data to an external SFTP server. Because the SFTP can fail, it will=20 > keep trying up to 4 times with 30 seconds sleep in case that SFTP=20 > connection fails. > > Recently, I found that I uploaded the file twice sometimes. I figured=20 > out the root cause is that my Dispatch server returns 'failure' at 6=20 > minutes while it keeps trying to do the SFTP. The App server=20 > received=C2=A0HTTP::Response with error status so it issued another call= to=20 > send data. It turns out I uploaded the identified file twice. > > Anybody has this sort of experience? Why does the dispatch=C2=A0server= =20 > return 'error' while it still processes the data? > > Thanks a lot, > Joseph >