Preventing plug-in timeouts when calling a slow external web service
Short answer
D Set the HTTP connection KeepAlive property to false so the plug-in does not time out when interacting with a slow or failing external web service.
Question
Key Takeaways
Microsoft's best practice for plug-ins that interact with external hosts is to set KeepAlive to false on the HTTP connection. Reusing a kept-alive connection to a slow/unresponsive host is a common cause of plug-in timeouts; disabling KeepAlive forces a fresh connection per request.
A plug-in makes multiple calls to an external web service and must not time out when that service is slow or failing. The documented remedy is to set the HTTP connection KeepAlive property to false when the plug-in interacts with external hosts, which avoids connection-reuse timeouts.
Common mistake: Choosing B (register synchronously). Synchronous plug-ins have a 2-minute execution limit and are worse for slow external calls; the actual fix for external-host timeouts is the KeepAlive setting, not the execution mode.
Expert Analysis
Why the Answer Is Correct
When a plug-in calls external web services, Microsoft's documented best practice is to set the HTTP connection KeepAlive property to false. Keeping a connection alive and reusing it against a slow or unresponsive external host leads to timeouts; disabling KeepAlive ensures each request uses a fresh connection and reduces the chance of stalling.
Why the Other Options Are Wrong
Registering the plug-in synchronously (B) imposes a 2-minute execution limit and makes timeouts more likely, not less. Assigning IOrganizationService to a member variable (A) is a general coding practice, not a timeout fix. Registering one step per request (C) adds overhead without addressing external-host latency.
Community Comment Notes
FCTopics (likes=3) links the official 'set KeepAlive false' best-practice article as the correct answer. Juan0414 (likes=1) notes synchronous plug-ins have a 2-minute limit, ruling out B.
Official Reference
This link opens the official vendor documentation in a new tab.
Community Votes
60% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
FCTopics 👍 3https://learn.microsoft.com/en-us/power-apps/developer/data-platform/best-practices/business-logic/set-keepalive-false-interacting-external-hosts-plugin Correct answer is D. If option B instead of synchronous would put asynchronous then I would have my doubts, but synchronous is not the way to go.
-
Juan0414 👍 1 Answered DB can not be. Synchronous plug-ins have a 2-minute execution time limit.(https://learn.microsoft.com/en-us/power-apps/developer/data-platform/analyze-performance#time-and-resource-constraints) Also, KeepAlive doc: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/best-practices/business-logic/set-keepalive-false-interacting-external-hosts-plugin#symptoms
-
1285cc6 👍 1 Answered BIf you try to use KeepAlive on a closed connection, it will cause the plug-in to fail(time out): taken from MS Docs: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/best-practices/business-logic/set-keepalive-false-interacting-external-hosts-plugin Register plugin as synchronous. It will throw an error and not timeout.
-
pey 👍 1 Answered BThis allows the plug-in to continue processing without waiting for the web service response, reducing the risk of timeouts.
-
PRash3566 👍 1 Answered DIMO: D
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PL-400 Questions
Access 85 questions with complete answers and detailed explanations.
View Full PL-400 Practice Test →