Resolving Slow Load Times in Centova Cast Statistics

Resolving Slow Load Times in Centova Cast Statistics

Experiencing slow loading or time-out errors on Centova Cast’s statistics pages can be attributed to certain client actions, particularly the use of poorly-designed third-party scripts polling the SHOUTcast/IceCast server’s audio feed at excessively frequent intervals. These actions result in the addition of illegitimate visitor tune-in requests to Centova Cast’s statistics database, leading to performance degradation.

To address this issue, follow these steps to identify and rectify the problem:

1. Identify the Problematic Account: The first step involves running a MySQL query to pinpoint the account responsible for the excessive requests. Execute the following query:

SELECT COUNT(*) AS sessions, accounts.username, accounts.id AS accountid
FROM visitorstats_sessions
LEFT JOIN accounts ON visitorstats_sessions.accountid = accounts.id
GROUP BY accounts.id
ORDER BY sessions DESC LIMIT 10;

This query returns a list of the top 10 accounts based on the number of visitor sessions. Identify the account with a significantly higher number of sessions, as this is likely the problem account.

2. Delete Excessive Data: Once the problematic account is identified, proceed to delete the excessive data for that account using the following query:

DELETE FROM visitorstats_sessions
WHERE starttime < DATE_SUB(NOW(), INTERVAL 1 MONTH)
AND accountid = [ACCOUNTID];

Replace [ACCOUNTID] with the accountid for the identified problem account.

3. Communicate with the Client: While removing existing data helps, it won’t prevent the client from continuing to overload the SHOUTcast server. Contact the client responsible for the problematic account and request them to fix their script to avoid recurring issues.

4. Optimize MySQL Table: To reclaim unused space in the MySQL data files, run the optimization query:

OPTIMIZE TABLE visitorstats_sessions;

Note that table optimization may take some time and could temporarily affect Centova Cast statistics pages. Once completed, normal functionality will be restored.

By following these steps, you can identify, rectify, and optimize Centova Cast’s statistics pages, ensuring a smoother experience for both administrators and visitors.

Leoz Dawn Avatar