WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.87k stars 967 forks source link

Constant database errors on INSERT INTO cache_schedule #9131

Open para2022 opened 1 month ago

para2022 commented 1 month ago

My log is flooded with the following errors. Any idea whats going on? Seems to be an issue with database table entries?

[14-Jun-2024 00:12:26 Europe/London] AVideoLog::ERROR: ObjectYPT::Error on save 2: ["videosQueries\/"] SCRIPT_NAME: /objects/videoDelete.json.php

[14-Jun-2024 00:12:26 Europe/London] AVideoLog::ERROR: ObjectYPT::Error on save 1: INSERT INTO cache_schedule_delete ( id,name ) VALUES ( NULL , ? ) Error : (0) [{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CacheDB.php","line":26,"function":"save","class":"ObjectYPT","type":"->"},{"file":"\/var\/www\/html\/ourtube\/objects\/Object.php","line":1168,"function":"deleteCacheStartingWith","class":"CacheDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/objects\/video.php","line":2972,"function":"deleteCache","class":"CacheHandler","type":"->"},{"file":"\/var\/www\/html\/ourtube\/objects\/videoDelete.json.php","line":28,"function":"delete","class":"Video","type":"->"}] SCRIPT_NAME: /objects/videoDelete.json.php

[14-Jun-2024 00:06:25 Europe/London] AVideoLog::ERROR: ObjectYPT::Error on save 2: ["category\/0\/"] SCRIPT_NAME: /objects/aVideoEncoder.json.php

[14-Jun-2024 00:06:25 Europe/London] AVideoLog::ERROR: ObjectYPT::Error on save 1: INSERT INTO cache_schedule_delete ( id,name ) VALUES ( NULL , ? ) Error : (0) [{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CacheDB.php","line":26,"function":"save","class":"ObjectYPT","type":"->"},{"file":"\/var\/www\/html\/ourtube\/objects\/Object.php","line":1168,"function":"deleteCacheStartingWith","class":"CacheDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/objects\/video.php","line":684,"function":"deleteCache","class":"CacheHandler","type":"->"},{"file":"\/var\/www\/html\/ourtube\/objects\/aVideoEncoder.json.php","line":196,"function":"save","class":"Video","type":"->"}] SCRIPT_NAME: /objects/aVideoEncoder.json.php

[14-Jun-2024 00:00:04 Europe/London] AVideoLog::ERROR: ObjectYPT::Error on save 2: ["playlistsUser\/2558\/"] SCRIPT_NAME: /view/channelPlaylistItems.php

[14-Jun-2024 00:00:04 Europe/London] AVideoLog::ERROR: ObjectYPT::Error on save 1: INSERT INTO cache_schedule_delete ( id,name ) VALUES ( NULL , ? ) Error : (0) [{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CacheDB.php","line":26,"function":"save","class":"ObjectYPT","type":"->"},{"file":"\/var\/www\/html\/ourtube\/objects\/Object.php","line":1168,"function":"deleteCacheStartingWith","class":"CacheDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/objects\/playlist.php","line":926,"function":"deleteCache","class":"CacheHandler","type":"->"},{"file":"\/var\/www\/html\/ourtube\/objects\/playlist.php","line":234,"function":"save","class":"PlayList","type":"->"},{"file":"\/var\/www\/html\/ourtube\/view\/channelPlaylistItems.php","line":48,"function":"getAllFromUser","class":"PlayList","type":"::"}] SCRIPT_NAME: /view/channelPlaylistItems.php

para2022 commented 1 month ago

I dont have the cache turned on by the way. Also my cache_schedule_delete table exists and has entries.

DanielnetoDotCom commented 1 month ago

Check for plugins updates, and update and install the tables even if you are not using.

also your logs are incomplete, you are not showing the log lines that matters,

para2022 commented 1 month ago

I have updated all plugins and my system is up to date. Ive removed all DB cache tables and let them recreate and ive also used the recreatedb script in install to do it.

para2022 commented 1 month ago

Screenshot 2024-06-14 at 00 23 22

DanielnetoDotCom commented 1 month ago

I am not sure why is not showing the reason why the cache_schedule_delete is failing.

make sure this table exists in your database.

para2022 commented 1 month ago

Yes it exists and if i delete it like just now it installs again. I get the following in my log when i delete it

[14-Jun-2024 00:30:30 Europe/London] AVideoLog::ERROR: [sqlDAL::readSql] (mysqlnd) Prepare failed again return false SCRIPT_NAME: /view/modeYoutube.php

[14-Jun-2024 00:30:30 Europe/London] AVideoLog::ERROR: MySQL ERROR: [{"file":"\/var\/www\/html\/ourtube\/objects\/mysql_dal.php","line":317,"function":"log_error"},{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CachesInDB.php","line":146,"function":"readSql","class":"sqlDAL","type":"::"},{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CacheDB.php","line":72,"function":"_getCache","class":"CachesInDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Cache.php","line":390,"function":"getCache","class":"CacheDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/objects\/Object.php","line":693,"function":"getCache","class":"Cache","type":"::"}] SCRIPT_NAME: /view/modeYoutube.php

[14-Jun-2024 00:30:30 Europe/London] AVideoLog::ERROR: [sqlDAL::readSql] (mysqlnd) Prepare failed: (1146) (Table 'myMySQLDatabase.CachesInDB' doesn't exist) preparedStatement = "SELECT * FROM CachesInDB WHERE name = ? AND ishttps = ? AND domain = ? AND user_location = ? AND loggedType = ? ORDER BY id DESC LIMIT 1" formats = "sisss" values = ["hashName_isIPBan_34_212_161243",1,"www.mysite.com","undefined","n"] refreshCache = false SCRIPT_NAME: /view/modeYoutube.php

[14-Jun-2024 00:30:30 Europe/London] AVideoLog::ERROR: MySQL ERROR: [{"file":"\/var\/www\/html\/ourtube\/objects\/mysql_dal.php","line":305,"function":"log_error"},{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CachesInDB.php","line":146,"function":"readSql","class":"sqlDAL","type":"::"},{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Objects\/CacheDB.php","line":72,"function":"_getCache","class":"CachesInDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/plugin\/Cache\/Cache.php","line":390,"function":"getCache","class":"CacheDB","type":"::"},{"file":"\/var\/www\/html\/ourtube\/objects\/Object.php","line":693,"function":"getCache","class":"Cache","type":"::"}] SCRIPT_NAME: /view/modeYoutube.php

[14-Jun-2024 00:30:13 Europe/London] AVideoLog::DEBUG: Time: 0.522s | Limit: 0.5s | Location: path/to/my/streamer/site/view/modeYoutube.php Line 404 [modeYoutube.php] IP=34.212.161.243 SCRIPT_NAME: /view/modeYoutube.php [14-Jun-2024 00:30:11 Europe/London] AVideoLog::DEBUG: Time: 0.581s | Limit: 0.5s | Location: path/to/my/streamer/site/view/modeYoutube.php Line 404 [modeYoutube.php] IP=185.191.171.7 BOT USER_AGENT=Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html) SCRIPT_NAME: /view/modeYoutube.php [14-Jun-2024 00:30:10 Europe/London] AVideoLog::DEBUG: Time: 0.503s | Limit: 0.5s | Location: path/to/my/streamer/site/view/modeYoutube.php Line 404 [modeYoutube.php] IP=34.212.161.243 SCRIPT_NAME: /view/modeYoutube.php [14-Jun-2024 00:30:06 Europe/London] AVideoLog::DEBUG: Time: 0.500s | Limit: 0.5s | Location: path/to/my/streamer/site/view/modeYoutube.php Line 404 [modeYoutube.php] IP=34.212.161.243 SCRIPT_NAME: /view/modeYoutube.php

DanielnetoDotCom commented 1 month ago

try this, clear your log file, and check again. maybe those errors was from before you install the table.

para2022 commented 1 month ago

Ok

I just seen tones of these when i was watching my apache error.log

rm: cannot remove '/var/www/html/ourtube/videos/cache/YPTStorage/log/video59818.log': Permission denied

DanielnetoDotCom commented 1 month ago

also make sure your /var/www/html/ourtube/videos/cache/ is permission 777

para2022 commented 1 month ago

/var/www/html/ourtube/videos/cache/

Thanks.

DanielnetoDotCom commented 1 month ago

I found something that may prevent those insert errors

para2022 commented 1 month ago

Those errors have gone away now thanks

JoshWho commented 5 days ago

Mine always says slow actions or some weird error I look past them now, seems like it is not adequate to support what it thinks it has.