Issues with Deactivating / Reactivating SIMs

I’m having issues with SIM card deactivation / reactivation starting around 2AM last night. I do this through the API, and I am seeing 504 gateway timeouts. I use this API endpoint.

Trying to reproduce this with the console, I am seeing a long wait time to reactivate a SIM, then the console will show deactivated for a few minutes before changing over to activated.

This is with a 890141* SIM.

I’ve been doing this for months (testing our firmware to go on and offline) without issue. Has something changed? Should I be waiting longer for a response? The documentation does not list an expected wait time for this operation.

SIMs that begin with 89041 (all LTE devices and the Boron 2G/3G), can take some time to activate or deactivate. Sometimes it will take a few minutes, but it will occasionally take a few hours, or a few days.

This obviously not a great situation, but we don’t have any control over it as the requests are sitting in the mobile carrier’s queue waiting to be processed, it just take a long time sometimes. If it’s taking more than a few hours you can submit a support request with the ICCID and they can make sure the request was made correctly, and is just taking an unusually long time.

If these requests are going into a queue … does that mean they will queue up multiple requests for changes to activation status?

Lets say I issue an activation then deactivation then reactivation. Could it process the activation now then not process the deactivation until later?

Does the Particle API provide accurate SIM status? ie If I look up SIM status on the Particle API, am I getting the actual status from the MVNO or some calculated status based on requests I’ve made?

Seems like this wording needs to be changed:
image

The requests are de-duped so if you request something that’s already in the queue you will stay in the original location in the queue.

The problem is that the carrier used by the LTE and new devices isn’t able to process the requests as fast as the old carrier. To at least make this less confusing, work is being done to make these operations asynchronous, so you can start them and be notified when the operation is actually complete.

OK, I guess this all makes sense. It seems weird that I have to figure this out “the hard way”. Is there anything else about these SIMs I should know before we put 500+ in the field this summer?

If I get a 504 gateway error, should I treat that as a success? Or do I need to repeat the command until I get some sort of response? I am guessing I need to treat 504 as a success of sorts, it seems to be working.

Following up on this – If I get a 504 gateway error, should I treat that as a success? Or do I need to repeat the command until I get some sort of response? I am guessing I need to treat 504 as a success of sorts, it seems to be working.

Related question – if I see a SIM is active in the console, is it actually active, or does that mean it is in the queue for activation? It seems like there needs to be a multi-state in the console to show something like inactive <> queued active <> active <> queued inactive <> inactive

I’d probably assume if you get a 504 it succeeded.

When the asynchronous SIM operations are added there will be more states. Right now, it’s usually, but not always, the state the SIM will be in when the operation completes.