Take the community feedback survey now.

Service API task status return 404 for running task

Vote:
 

Hi Optimizely

We are using Service API 5.5 and experience random 404's on running tasks, have anyone experience the same?
It happens to both ​the /episerverapi​/commerce​/task​/{taskId}​/status endpoint and the ​/episerverapi​/commerce​/task​/{taskId}​/log endpoint

Best regards,
Christian

#339492
Jun 19, 2025 9:21
Vote:
 

How many instances do you have? It sounds like you are getting random 404 when the request hits another instance. as Task is in memory, it'll be not found in a different instance than the one that was running it. 

#340030
Aug 22, 2025 11:41
Vote:
 

Hi Quan

How do I determine that? The site is hosted on AWS EC2 with an IIS with two websites, one for CMS and one for Commerce Manager.

#340334
Edited, Sep 10, 2025 9:21
Vote:
 

How many instances of EC2 do you have? I'm not familiar with EC2 myself, but it seems each EC2 instance is a VM. You don't have just one VM right? 

#340335
Sep 10, 2025 9:30
Vote:
 

Yes, we have only one instance.

#340337
Sep 10, 2025 10:43
Vote:
 

Then unfortunately i have no other idea. If it happens and you request again does it return something or it is consistently 404?

#340348
Sep 11, 2025 6:23
Vote:
 

It's inconsistent and happens sporadically..

#340349
Sep 11, 2025 7:16
Vote:
 

Then I'd suggest to use a retry policy handler, like Polly, to retry if you get 404 responses. I'd love to get to the bottom of this, but given it's elusive by nature, better to have a blanket solution 

#340351
Sep 11, 2025 7:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.