News:

SMF - Just Installed!

Main Menu

Created Subscriptions have no web hosting support:

Started by mahesh, Dec 17, 2024, 07:49 AM

Previous topic - Next topic

mahesh

Question
Created Subscriptions have no web hosting support: Integrity constraint violation: 1062 Duplicate entry '12-max_site ' for key 'PRIMARY'
Symptoms
  • Subscriptions created via Plesk > Subscriptions > Add subscription are created without hosting support.

  • The Subscription creation fails with error:
Task is not responding: id=2467, pid=1246, type=subscription-create, clientRemoteAddr=1.2.3.4, current_stage=Plan, ownerId=1, referrer=/admin/subscription/create, renameTourAvailable=1, runTaskUnderLogin=admin, subscriptionName=example.com, vendorId=1

  • The following error can be found in /var/log/plesk/panel.log
ERR [panel] Task failed: id=11840, pid=2036688, type=subscription-create, error=DB query failed: SQLSTATE[23000
]: Integrity constraint violation: 1062 Duplicate entry '12-max_site' for key 'PRIMARY', query was: REPLACE INTO Limits (limit_name, value) VALUES (?, ?)
[2023-01-24 12:50:40.120] 2036688:63cfc60d83b1c ERR [panel] DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '12-max_site
' for key 'PRIMARY', query was: REPLACE INTO Limits (limit_name, value) VALUES (?, ?)
  • The following error shows up when running plesk repair db:
#plesk repair db -n -v
...
Checking the consistency of the Plesk database
Wrong AUTO_INCREMENT values in the following tables: Limits: 13 ≠
32, Permissions: 13 ≠ 33 .......................................... [ERROR]
Error messages: 1; Warnings: 0; Errors resolved: 0

Cause
Database inconsistency

Resolution
  • Connect to the server via SSH
  • Create a psa database backup as instructed here
  • Repair the databases by running the command below:

#plesk repair db
Note: The above command will require user intervention to reply "y/n" questions, to repair this automatically use the flag -y as plesk repair db -y