Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.9.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Home page is awfully slow

We have a decent of OCS clients worldwide mostly linux.

Even with all the DB tweaks to get a better performance, we are still experiencing a very long time to connect to the OCS homepage. After some debug, it was the number of softwares that appears in the dashboard that was stuk for 280 seconds. So I commented this code from require/console/Console.php :

        //$sql = "SELECT s.ID, count(CONCAT(s.NAME_ID,'_',s.VERSION_ID)) FROM `software` s LEFT JOIN accountinfo a ON a.HARDWARE_ID = s.HARDWARE_ID";

        //if (is_defined($_SESSION['OCS']["mesmachines"])) {

        //  $sql .= " WHERE " . $_SESSION['OCS']["mesmachines"];


        //$sql .= " GROUP BY CONCAT(s.NAME_ID,'_', s.VERSION_ID)";

        //$result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"]);

        //$softs = "<a style='font-size:32px; font-weight:bold;' href='index.php?function=visu_all_soft'>".mysqli_num_rows($result)."</a>";

        $softs = "<a style='font-size:32px; font-weight:bold;' href='index.php?function=visu_all_soft'>TOO_MANY</a>";

This way, the OCS server is behaving normally and maybe it could be a good enhancement for the future.
For information, we have more than 8 000 OCS clients contacting everyday and 80 000 in DB. The softwares DB has been recently scratched and is counting   around 160 000 softwares.
Hope this helps, Thomas.
in Administrative console by (270 points)

Please log in or register to answer this question.

Powered by Question2Answer