Hi,In my dev environment, information page (Admin - Control Panel - Information - /scp/system.php) loads fine. in my production Server witch is a clone of dev, information page in osticket admin, keeps loading and nothing else. I suspect that it has to do with database size because in dev my database is only 21MB and in prod db is 9GB.Can someone with same or bigger database, tell me if he has the same problem?Osticket Version 1.10.1RegardsGeorge

My database is only 1gb and it works fine.Are you getting any errors in the php error log or anything?

Hi ntozier,thanks for the reply, unfortunately I dont get any errors in my logs.

Sounds like you might want to turn on mysql slow query logging and check the MySQL logs.I've never heard of anyone having this problem.

Page is loading after waiting for 3-5 minutes. db is 10.4GB, table with files is 10GB. In system.inc.php i removed  $sql = 'SELECT SUM(LENGTH(filedata)) / 1048576 FROM '.FILE_CHUNK_TABLE; and page loads immediately now.

@[deleted]That is the query that gives you the amount of space used for attachments in the database. This will definitely take a long time if your database has 10 GB worth of attachments. Commenting it out like you say will definitely boost load time but you won't be able to see how much space is used for attachments (unless you go to the database).Cheers.

Maybe have cron clearn up calculate this value and "cache" it in the ost_config table.  And only run if its been 24 hours or more since cron last updated it?

@[deleted]Could you please do me a favor? Could you apply the below changes and see if the page loads any faster for you? (make sure you make a backup of the original file just in case)```

-        $sql = 'SELECT SUM(LENGTH(filedata)) / 1048576 FROM '.FILE_CHUNK_TABLE;

-        $space = db_result(db_query($sql));

-        echo sprintf('%.2f MiB', $space); ?></td></tr>

+        $sql = 'SELECT

+                        TABLE_NAME,

+                        (DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024

+                    FROM

+                        information_schema.TABLES

+                    WHERE

+                        TABLE_SCHEMA = "'.DBNAME.'"

+                    AND

+                        TABLE_NAME = "'.FILE_CHUNK_TABLE.'"

+                    ORDER BY

+                        (DATA_LENGTH + INDEX_LENGTH)

+                    DESC';

+        $space = db_fetch_row(db_query($sql));

+        echo sprintf('%.2f MiB', $space); ?></td></tr>

```I appreciate your help with testing this in advance. Cheers.

loading immediately!!!!! Thanks a lot :)  

Should I mark this thread as resolved and close it? :)

@[deleted]I'm glad I could help!I have made a pull request that fixes this here (if anyone else is interested):https://github.com/osTicket/osTicket/pull/4275Cheers.

Write a Reply...