Forums

task with problems to start

Hi,

this is my task. the code seems to run without errors but the task is not running nearly always starting and even when running is displayed it is not seen in the running list of processes:

python 3.10 /home/Digimidi/task_antoine_vetmidi_gpt

where can I find the problem ? thank you

in fact it is on running for few seconds and then becomes starting again

Always on tasks are supposed to run continuously. If your task runs for a short time and then exits, it will take a few minutes to restart again.

thank you but even when I remove the timer I have the same problem. And I don't know how to debug.

I have a small error message in the console telling me that NumPy is imported twice, but it should ne be the reason

I found it was a space between python and 3.10 and the file could not be launched.

Glad to see that you found it!

hi again, yes but... I see that the task is always going back in starting mode. in action there is nothing else than task preparing to start. And sometime I see the fetches task listed may mainly never. But some how the task is running because the script is working to do the job.

It is a real mystery and I dont know how to go further to understand what I. should do to have a robust and stable system

Your task appears to be just starting and then exiting without generating any output and that is why it appears to be stuck in the "Starting" state. Add some logging so you can see how the task is failing and then you can debug it.

Hi glenn, i have a loggin now and I don't see any error coming when the task is run. it does what it is supposed to do...

so I'm still lost. thank you for your help

What you get in logs?

2023-07-20 12:09:31,271 - urllib3.util.retry - DEBUG - Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None) 2023-07-20 12:09:31,321 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.openai.com:443 2023-07-20 12:09:33,693 - urllib3.connectionpool - DEBUG - https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None 2023-07-20 12:09:33,699 - openai - DEBUG - message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=2192 request_id=5747594b9703f53213c83fc33069b20d response_code=200 2023-07-20 12:09:33,708 - root - INFO - GPT-3 call took 2.48 seconds. 2023-07-20 12:14:36,113 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): login.microsoftonline.com:443 2023-07-20 12:14:36,524 - urllib3.connectionpool - DEBUG - https://login.microsoftonline.com:443 "POST /78ed2c77-d7fd-4aaa-a0bd-119d11f51386/oauth2/v2.0/token HTTP/1.1" 200 1683 2023-07-20 12:14:36,647 - root - INFO - Access token acquired 2023-07-20 12:14:36,653 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): graph.microsoft.com:443 2023-07-20 12:14:36,878 - urllib3.connectionpool - DEBUG - https://graph.microsoft.com:443 "GET /v1.0/users/antoine@vetmidi.com/messages?$filter=isRead%20eq%20false%20and%20receivedDateTime%20ge%202023-07-20T00:00:00Z HTTP/1.1" 200 None 2023-07-20 12:14:36,887 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): login.microsoftonline.com:443 2023-07-20 12:14:37,319 - urllib3.connectionpool - DEBUG - https://login.microsoftonline.com:443 "POST /78ed2c77-d7fd-4aaa-a0bd-119d11f51386/oauth2/v2.0/token HTTP/1.1" 200 1683 2023-07-20 12:14:37,363 - root - INFO - Access token acquired 2023-07-20 12:14:37,370 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): graph.microsoft.com:443 2023-07-20 12:14:37,912 - urllib3.connectionpool - DEBUG - https://graph.microsoft.com:443 "GET /v1.0/users/antoine@vetmidi.com/messages/AAMkADY0OGMwNzYwLTUzMGUtNGQ3Ny04NGI5LThkYWUxMTkyODExMgBGAAAAAAAQ4wsV1FxUR652zaYZTntIBwCPOj10F4vOT7fGC3dMi8_TAAAAAAEMAACPOj10F4vOT7fGC3dMi8_TAAQDYoqmAAA=/attachments HTTP/1.1" 200 None 2023-07-20 12:14:38,196 - openai - DEBUG - message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions 2023-07-20 12:19:49,520 - urllib3.util.retry - DEBUG - Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None) 2023-07-20 12:19:49,565 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.openai.com:443 2023-07-20 12:19:53,334 - urllib3.connectionpool - DEBUG - https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None 2023-07-20 12:19:53,338 - openai - DEBUG - message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=3455 request_id=34e075e2ab47d3c315bf54ae86918dc2 response_code=200 2023-07-20 12:19:53,346 - root - INFO - GPT-3 call took 3.86 seconds. 2023-07-20 12:25:02,950 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): login.microsoftonline.com:443 2023-07-20 12:25:03,317 - urllib3.connectionpool - DEBUG - https://login.microsoftonline.com:443 "POST /78ed2c77-d7fd-4aaa-a0bd-119d11f51386/oauth2/v2.0/token HTTP/1.1" 200 1683 2023-07-20 12:25:03,328 - root - INFO - Access token acquired 2023-07-20 12:25:03,334 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): graph.microsoft.com:443 2023-07-20 12:25:03,559 - urllib3.connectionpool - DEBUG - https://graph.microsoft.com:443 "GET /v1.0/users/antoine@vetmidi.com/messages?$filter=isRead%20eq%20false%20and%20receivedDateTime%20ge%202023-07-20T00:00:00Z HTTP/1.1" 200 None 2023-07-20 12:25:03,570 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): login.microsoftonline.com:443 2023-07-20 12:25:04,241 - urllib3.connectionpool - DEBUG - https://login.microsoftonline.com:443 "POST /78ed2c77-d7fd-4aaa-a0bd-119d11f51386/oauth2/v2.0/token HTTP/1.1" 200 1683 2023-07-20 12:25:04,883 - root - INFO - Access token acquired 2023-07-20 12:25:04,890 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): graph.microsoft.com:443 2023-07-20 12:25:05,039 - urllib3.connectionpool - DEBUG - https://graph.microsoft.com:443 "GET /v1.0/users/antoine@vetmidi.com/messages/AAMkADY0OGMwNzYwLTUzMGUtNGQ3Ny04NGI5LThkYWUxMTkyODExMgBGAAAAAAAQ4wsV1FxUR652zaYZTntIBwCPOj10F4vOT7fGC3dMi8_TAAAAAAEMAACPOj10F4vOT7fGC3dMi8_TAAQDYoqmAAA=/attachments HTTP/1.1" 200 None 2023-07-20 12:25:05,072 - openai - DEBUG - message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions 2023-07-20 13:07:07,512 - urllib3.util.retry - DEBUG - Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None) 2023-07-20 13:07:07,537 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.openai.com:443 2023-07-20 13:07:11,137 - urllib3.connectionpool - DEBUG - https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None 2023-07-20 13:07:11,138 - openai - DEBUG - message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=3355 request_id=3bd5682ee726e4a1a2854c87527b2673 response_code=200 2023-07-20 13:07:11,147 - root - INFO - GPT-3 call took 3.66 seconds.

That looks like a task that is running correctly, but if it's exiting quickly, then you'd still see the task seemingly stuck in the "Starting" state.

yes it is what is happening and I don't know why and how to fix it ? there is something with the taks I dn't understand. what makes it not running well ?

That is something that your code is doing. If you stop it from exiting, you will not have the issue.