python - Process stuck within SQS calls -


I have a python script that only checks messages on SQS in a loop and then closes a cron The script is restarted by the job every few minutes, if it is not running

  #startdef main (): ------ I from 1 to 100 : ------------- Check the SQ for a new message [Install connection with SQLX] # Long voting was not used, message Set Rticsha time 0. ------------- If new job was found: ---------------------- ProcessIt () #and   

I think that after a few days of running the script on the EC2 example, the script becomes stale and it does not check for any new messages from SQS

When I process the pid For lsof run, grepping only for SQS connections, I am at all connections for SQSCLOSE_WAIT. Fix for my problem is to kill and restart the script process manually. It seems that the cron is not able to resume the script because it is already running and the SQS is stuck in the call:

  ip-10-xyz : ~ # LSOFP 9018 | Grep "72.21" ld-linux 9018 Route 7u IPv4 47469 9 439 0 T. TPP IP-10-X-Y-Z. AC2 Insurer: 58211- & gt; 72.21.202.145: https (CARC_YAIT) LD-Linux 9018 Route 10u IPv4 4746995060 T TCP IP-10-X-Y-AG-2.in RR: 53428- & gt; 72.21.194.47: https (CARC_YAIT) LD-Linux 9018 Route 12u IPv4 474701017 0t0 TCP IP-10-X-Y-JSC 2.in Arrayen: 52166- & gt; 72.21.214.70: https (CLOSE_WAIT) LD-Linux. 9018 Route 18u IPv4 474694555 0t0 TCP IP-10-X-Y-AJ.AC 2 Internal: 57267- & gt; 72.21.202.145: https (CARC_YAIT) LD-Linux 9018 Route 22u IPv4 474694573 0t0 TCP IP-10-X-Y-Esek-2.in: 57271- & gt; 72.21.202.145: https (CLOSE_WAIT) ld-linux 9018 Route 39u IPv4 474701031 0t0 TCP IP-10-XISAC 2.in Indoor: 52170- & gt; 72.21.214.70: https (CLOSE_WAIT)    

I know I should use a longer voting, but still wondering why it is stuck in the process and It never reaches itself. I am using Boto 2.23

Any helpful assistant will be useful

GDB Debugging gave birth to the following traceback for my trapped process:

  (gdb) pystack ~ / mypackage / lib / python2.6 / ssl.py (293): do_handshake ~ / mypackage / Lib / python2.6 / ssl.py (120): __init__ ~ / mypackage / lib / python2.6 /ssl.py (350): wrap_socket ~ / mypackage / lib / python2.6 / site-packages / boto / https_connection. Py (118): connect ~ / mypackage / lib / python2.6 / httplib.py (725): send ~ / mypackage / lib / python2.6 / httplib.py (764): _send_output ~ / mypackage / lib / python2. 6 / httplib.py (892): Enders ~ / my Package / lib / python2.6 / httplib.py (937): _send_request ~ / mypackage / lib / python2.6 / httplib.py (899): request ~ / mypackage / lib / python2.6 / site-packages / boto / Connection.py (902): _mexe ~ / mypackage /lib/python2.6/site-packages/boto/connection.py (1063): make_request ~ / mypackage / lib / python2.6 / site-packages / boto / connection Py (1138): get_object ~ / mypackage / lib /python2.6/site-packages/boto/sqs/connection.py (355): get_queue ~ / mypackage / lib / python2.6 / sit e-package / sqs / SQSHelper .py (96): __init__ ~ / mypackage / sqs / SQSWrapper.py (1229): Main ~ / mypackage / sqs / SQSWrapper.py (1367): & lt; Module & gt;   

As we can see that my script is stuck in the get_queue () API of SQAS.

It seems that the Python 2.6 in the SDL's Handshak function was fixed in Python. 2.7, but somebody reported the same problem in Python 2.7 [See the link below] To correct the whole point as well as using Python 2.7 I have a few minutes at the SQS API in my SQAS wrapper code Set the limit: The following link helped me to identify the root cause and:



Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -