Problem With Admin Login

I have not done any changes, currently am on CS-Cart 4.8.1

Since last week or week before that domain.com/admin.php after I hit login it is taking rather long maybe 20 - 30 seconds for getting to backend. Everything wokrs rather quick, front end and backend, problem is just this delay in actually getting to backend no matter what I use, pc or other device. Have removed cache folder from var, cleared redirects, logs, optimised db but no luck.

Were to look for a problem ?

Check your statistics date - maybe it's set to a year or so?

I have not done any changes, currently am on CS-Cart 4.8.1

Since last week or week before that domain.com/admin.php after I hit login it is taking rather long maybe 20 - 30 seconds for getting to backend. Everything wokrs rather quick, front end and backend, problem is just this delay in actually getting to backend no matter what I use, pc or other device. Have removed cache folder from var, cleared redirects, logs, optimised db but no luck.

Were to look for a problem ?

There was such an issue related with incorrect SQL queries for statistic on dashboard. Please contact support team for the fix

And may I ask where is that at?

Check your statistics date - maybe it's set to a year or so?

At first check size of the cscart_logs table

Note that EZ Admin Helper will let you manage the logs by pruning them to some number of days.

Note that EZ Admin Helper will let you manage the logs by pruning them to some number of days.

Not sure which version but CSC recently added that function.

Not sure I've seen that. They have a "clean logs" item on the gear menu for the logs page. But I don't see any setting for number of days.

[attachment=13836:Screenshot_2019-06-10 Settings Logging - Administration panel.png]

Screenshot_2019-06-10 Settings Logging - Administration panel.png

I had it cleaned recently, its just up to 200 lines ~10kB

At first check size of the cscart_logs table

So check list of tables and sort them by size. What do you see in top 5 ?

cscart_order_data
cscart_order_details
cscart_product_features_values
cscart_search_cache_en_1
cscart_stored_sessions

First table is around 50MB

So check list of tables and sort them by size. What do you see in top 5 ?

From this I can say that the issue is not in database

Either enable DEBUG or use your browser inspector to look at the network tab to see where it's spending its time. Suggest that after you open a browser inspector window and you are at the admin login page that you clear your site cache and your browser cache and then login so you can see where time is being spent. Note that you should enable "log retention" to see full activity across redirects.

So when I hit login

admin.php in inspector / network tab gives 302 and has longest responds

Second longest responds is from

admin.php?dispatch=helpdesk_connector.auth

And may I ask where is that at?

Under the quick search, top right of admin (not sure about the latest version and if it's still there though). You can select the date for the statistics that show on the homepage of the admin area.

We had someone who had the same issue, and she had this set to a year. So each time she logged in, the statistics for a full year were being calculated, which took about 20 seconds.

Under the quick search, top right of admin (not sure about the latest version and if it's still there though). You can select the date for the statistics that show on the homepage of the admin area.

We had someone who had the same issue, and she had this set to a year. So each time she logged in, the statistics for a full year were being calculated, which took about 20 seconds.

I remember this issue too. It can be the reason

I don't see a quick search setting anywhere

To me it looks like its hard coded in the controller to be a the last 30 days of sales if there is no time period specified.

Confirmed its hard coded there is no way to change the default behavior without editing the controller for the dashboard.

IN: app/controllers/backend/index.php

Line 48: $time_period = DateTimeHelper::getPeriod(DateTimeHelper::PERIOD_MONTH_AGO_TILL_NOW);

Change the time period to what you need to improve load times.