# Long-running Admin API calls within Shopware app lifecycle events

**URL:** <https://forum.shopware.com/t/long-running-admin-api-calls-within-shopware-app-lifecycle-events/105899>\
**Category:** Shopware 6 (English)\
**Created:** [19. November 2024 um 16:10 UTC](https://forum.shopware.com/t/long-running-admin-api-calls-within-shopware-app-lifecycle-events/105899 "2024-11-19T16:10:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Musfira](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@Musfira](https://forum.shopware.com/u/Musfira)\
**Post date:** [19. November 2024 um 16:10 UTC](https://forum.shopware.com/t/long-running-admin-api-calls-within-shopware-app-lifecycle-events/105899/1 "2024-11-19T16:10:49Z")

</div>

Hi everyone,

I’m using a PHP Symfony server as my app server and calling the Admin API via the Shopware App PHP SDK. I’ve encountered an issue where API calls to delete or update entities sometimes take longer than the event time frame allows.

Additionally, when the app is deactivated, I lose access to the shop, leading to errors like „not authenticated“ or „missing privilege to the entity.“

Is there a way to handle such cases or any best practices to manage API calls within lifecycle events?

Thanks in advance for your help!
