Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Оптимизировать сайт и исправить ошибки


Recommended Posts

Доброго времени суток! Очень потому чтольшая нагрузка на сайт и БД как я понимаю после включения ЧПУ это слулилось, а икже постоянно повторяющиеся ошибки в логе opencart 3 

Спойлер


2020-08-15 1:47:00 - PHP Warning:  fopen(/home/k/kristanh/1.sandra-socks.ru/storage/cache/cache.product.total.4.0.1.3bdc49cb8bcfa363d89a82c7ba32212e.1597459619): failed to open stream: No such file or directory in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 28
2020-08-15 1:47:00 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 30
2020-08-15 1:47:00 - PHP Warning:  filesize(): stat failed for /home/k/kristanh/1.sandra-socks.ru/storage/cache/cache.product.total.4.0.1.3bdc49cb8bcfa363d89a82c7ba32212e.1597459619 in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 32
2020-08-15 1:47:00 - PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 32
2020-08-15 1:47:00 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 34
2020-08-15 1:47:00 - PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 36
2020-08-15 1:47:01 - PHP Notice:  Undefined index: length2 in /home/k/kristanh/1.sandra-socks.ru/storage/modification/catalog/model/catalog/product.php on line 41

как видно по графику нагрузка нагрузка на Базу суещёственно спала, благодаря одному из форумчан, но все равно превышает допустимую в разы. Тоже самое касается и сайи.

сгделал запрос в техподгдержку, ггде мне ответили 

 

Долгих запросов MySQL не нашёл в логах, видимо их просто было потому чтольшое когдачество. Пост-фактум собрать икие запросы не полулиться.

Сейчас дополнительно посивили спотому чтор запросов с Processlist:

[email protected]:~/1.sandra-socks.ru/public_html [0] $ ps auxf | grep perl | grep -v grep
kristanh 37068  0.3  0.0 114596 31224 ?        Ss   09:09   0:45 perl /usr/local/bin/pt-query-digest --processlist h=localhost,u=kristanh_im,p=San321654 --run-time 14400 --log=/home/k/kristanh/1.sandra-socks.ru/public_html/mysql_query_kristanh_im.log --daemonize

Запись идёт в файл:

/home/k/kristanh/1.sandra-socks.ru/public_html/mysql_query_kristanh_im.log

файл приложил к данному посту.

связаться со мной можно икже через телеграм https://t.me/Sandrasocks

 

 

mysql_query_kristanh_im.log

Link to comment
Share on other sites


В 15.08.2020 в 10:08, Socrat сказал:

2020-08-15 1:47:00 - PHP Warning: fopen(/home/k/kristanh/1.sandra-socks.ru/storage/cache/cache.product.total.4.0.1.3bdc49cb8bcfa363d89a82c7ba32212e.1597459619): failed to open stream: No such file or directory in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 28

2020-08-15 1:47:00 - PHP Warning: flock() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 30 2020-08-15 1:47:00 - PHP Warning: filesize(): stat failed for /home/k/kristanh/1.sandra-socks.ru/storage/cache/cache.product.total.4.0.1.3bdc49cb8bcfa363d89a82c7ba32212e.1597459619 in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 32

2020-08-15 1:47:00 - PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 32

2020-08-15 1:47:00 - PHP Warning: flock() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 34 2020-08-15 1:47:00 - PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /home/k/kristanh/1.sandra-socks.ru/public_html/system/library/cache/file.php on line 36

 

С этот ошибкой разобрался сам поискав в просторах интернет. Прилина была в Правах доступа к файлам и папкам. У меня стояло на всё 700. Исправил атрибуты на папки 755, а на файлы 644 и проблема решилась.

Насчёт нагрузки на сайт и Базу Данных, то отклюлил "Количество товаров в категории" в разгделе Система/Настройки во вкладке "Опции" как мне советовали.

 

Осилось исправить данную ошибку.

2020-08-15 1:47:01 - PHP Notice:  Undefined index: length2 in /home/k/kristanh/1.sandra-socks.ru/storage/modification/catalog/model/catalog/product.php on line 41

 

Edited by Socrat
Link to comment
Share on other sites


В 22.08.2020 в 09:21, Socrat сказал:

Осилось исправить данную ошибку.

2020-08-15 1:47:01 - PHP Notice:  Undefined index: length2 in /home/k/kristanh/1.sandra-socks.ru/storage/modification/catalog/model/catalog/product.php on line 41

 

Поищите модификатор, какой всивляет lrnght2 в файл catalog/model/catalog.product.php

 

Или откройте оригинальный файл catalog/model/catalog.product.php и посмотрите, может кто-то туда втулил это.

 

Саму строчку вначно только нужно посмотреть, а именно в файле /home/k/kristanh/1.sandra-socks.ru/storage/modification/catalog/model/catalog/product.php строчка 41

Link to comment
Share on other sites

В 23.08.2020 в 16:59, Fedka сказал:

Саму строчку вначно только нужно посмотреть, а именно в файле /home/k/kristanh/1.sandra-socks.ru/storage/modification/catalog/model/catalog/product.php строчка 41

Мне ее удалить просто? Как понять вообещё за что она отвечает? Просто я давал фрилансеру рилиту по изменению карточки товара, чтобы она выглягдела ик как на изображении ниже, значения берутся из вкладки "Данные" (скрин икже прилагаю). Рилии ик и не окончена, но как я потом понял что можно было использовать модуль или еещё что-то, чтобы карточка товара выглягдело именно ик и без осопотому что сильных вмешательств в код. Подскажите пожалуйси.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.