Article ID: 111898, created on Aug 16, 2011, last review on Aug 12, 2014

  • Applies to:
  • Operations Automation 5.4
  • Operations Automation 5.2

Symptoms

APS tasks fail with error messages related to database connection issues like in the examples below:

Aug 11 08:42:54 poa : ERR [1:5437:b5330ba0:757 1:5528:b2fffba0 lib]: [task:3955 getApplicationInstanceResourcesUsage] {module_id="Common"; code="1"} Internal error: virtual Plesk::APS::ResourceUsageList* Plesk::APS::APSManager_impl::getApplicationInstanceResourcesUsage(TObjectID) : [APSC] Could not send Query (connection dead); Could not send Query(connection dead).

Aug 11 16:02:47 poa : ERR [1:5437:b421fba0:4831 1:11595:b2f23ba0 lib]: [task:3955 getApplicationInstanceResourcesUsage] {module_id="Common"; code="1"} Internal error: virtual Plesk::APS::ResourceUsageList* Plesk::APS::APSManager_impl::getApplicationInstanceResourcesUsage(TObjectID) : [APSC] Error while executing the query; ERROR: cursor "sql_cur0x9f4fe38" does not exist.

Aug 11 16:02:35 poa : ERR [1:5437:b421fba0:4831 1:11595:b2cffba0 lib]: [task:3955 getApplicationGlobalSettings] {module_id="Common"; code="1"} Internal error: void Plesk::APS::getApplicationGlobalSettings(TObjectID, const Plesk::APS::MetadataHelper&, Plesk::APS::settings_t&) : [APSC] Connection is already in use..

In short, the error messages are as follows (the list may be incomplete):

  • [APSC] Could not send Query (connection dead)
  • [APSC] Error while executing the query; ERROR: cursor "sql_cur0x9f4fe38" does not exist.
  • [APSC] Connection is already in use

Cause

The reason for the task failures is a problem in APS Service Controller with connecting to the POA database when several processes are working with database the (e.g. provisioning APS application instances while also running a resource reporting task, etc.).

One of the most time/resource-consuming tasks is the periodic task "Synchronize resource usage for instances of APS applications", which runs in the default installation every 5 minutes. If it is run, then the usual APS tasks may fail due to a problem with database connections.

Resolution

The problem is solved in POA 5.2 Update 6, refer to the KB article POA 5.2 Update 06 (KB112161) to apply the fix.

If POA cannot be updated immediately, the following workaround may be used: schedule the periodic task "Synchronize resource usage for instances of APS applications" to run once a day at night. This may be done in POA Provider Control Panel at Top > System Director > Task Manager > Periodic Tasks.

The same issue can occur not only because of the periodic task, but also on simultaneous provisionings of APS applications, because the solution in such situations is to re-run failed tasks.

c2898cda1192c88ccc616ade5f670bd6 5356b422f65bdad1c3e9edca5d74a1ae 2554725ed606193dd9bbce21365bed4e caea8340e2d186a540518d08602aa065 ac82ce33439a9c1feec4ff4f2f638899 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF