Closed gbrn closed 1 year ago
you need to share more from your log.
but I am pretty sure the issue is regarding your resources that are too limited.
the MySQL error seems to be a MySQL disconnection
all the hardware you described is too low for any type of AVideo site
https://github.com/WWBN/AVideo/wiki/AVideo-Platform-Hardware-Requirements
Dani, I will improve AWS RDS features and review.
I no longer have important error logs.
I did a test, increased the stancy and the problem is the same. (Remembering that I'm just changing the database server):
Previous instance class: db.t2.micro - 1 vCPU / 1 GiB RAM Current instance class: db.t3.micro - 2 vCPU / 1 GiB RAM / Rede: 2.085 Mbps
I increased it to 2 processors and the Mysql error problem persists. I continue the test... I am increasing to: db.t4g.micro. Let's see if there is any difference.
Errors displayed:
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: [sqlDAL::readSql] (no mysqlnd) Prepare failed: () (SELECT * FROM users_groups as ug WHERE 1=1 ) SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: MySQL ERROR: [{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/mysql_dal.php","line":231,"function":"log_error"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/userGroups.php","line":145,"function":"readSql","class":"sqlDAL","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/plugin\/CustomizeUser\/CustomizeUser.php","line":56,"function":"getAllUsersGroupsArray","class":"UserGroups","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/plugin\/Plugin.abstract.php","line":142,"function":"getEmptyDataObject","class":"CustomizeUser","type":"->"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":470,"function":"getDataObject","class":"PluginAbstract","type":"->"}] SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: [sqlDAL::readSql] (no mysqlnd) Prepare failed: () (SELECT * FROM plugins WHERE uuid = ? LIMIT 1) SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: MySQL ERROR: [{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/mysql_dal.php","line":231,"function":"log_error"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":166,"function":"readSql","class":"sqlDAL","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/plugin\/Plugin.abstract.php","line":101,"function":"getPluginByUUID","class":"Plugin","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":470,"function":"getDataObject","class":"PluginAbstract","type":"->"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":185,"function":"getOrCreatePluginByName","class":"Plugin","type":"::"}] SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: [sqlDAL::readSql] (no mysqlnd) Prepare failed: () (SELECT * FROM plugins WHERE uuid = ? LIMIT 1) SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: MySQL ERROR: [{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/mysql_dal.php","line":231,"function":"log_error"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":166,"function":"readSql","class":"sqlDAL","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":198,"function":"getPluginByUUID","class":"Plugin","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":87,"function":"loadFromUUID","class":"Plugin","type":"->"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":467,"function":"setUuid","class":"Plugin","type":"->"}] SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: [sqlDAL::readSql] (no mysqlnd) Prepare failed: () (SELECT * FROM plugins WHERE name = ? LIMIT 1) SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: MySQL ERROR: [{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/mysql_dal.php","line":231,"function":"log_error"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":142,"function":"readSql","class":"sqlDAL","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":460,"function":"getPluginByName","class":"Plugin","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":185,"function":"getOrCreatePluginByName","class":"Plugin","type":"::"},{"file":"\/home\/storage\/e\/88\/c1\/myMySQLDatabaseo\/public_html\/cnetv\/_beta40\/objects\/plugin.php","line":198,"function":"getPluginByUUID","class":"Plugin","type":"::"}] SCRIPT_NAME: /view/info.php
[18-Oct-2022 15:59:34 America/Sao_Paulo] AVideoLog::ERROR: [sqlDAL::writeSql] Prepare failed: () preparedStatement = "DELETE FROM plugins WHERE name = ?" formats = "s" SCRIPT_NAME: /view/info.php
you need at least 4 GB of ram, 1 GB is nothing
https://github.com/WWBN/AVideo/wiki/AVideo-Platform-Hardware-Requirements#how-should-the-ram-be
Hi Dani, yes I have previously checked the necessary requirements.
But I'm in this issue just changing the database server, which is AWS RDS.
When you mention at least the 4GB would be from the main server, the Web server, correct?
I'm running these tests, because as the errors that are presented refer to MYSQL, I think that by improving the database server the problems can be solved.
I'm avoiding messing with the Web Server, because there is also the storage of video files.
let's say the requirements, I expect the streamer and the DB on the same server.
they can be in a different server, but try to keep the same minimum requirements on both
Hi @DanielnetoDotCom , after 5 days of testing, I verified that the problems regarding MYSQL were solved. Using AWS RDS with 2 CPUs, even with 1 GiB RAM. (Remembering that it is only the Database running on this server). I believe that as demand increases this memory will have to be increased. But I can already get a cost/benefit parameter that I can use without problems.
Speaking of PHP files, I still get several "Warning: Slow process detected" alerts. Right now I'm starting a test with Lightsail from AWS, to handle PHP files.
thanks for letting me know the CPU is the bottleneck for the MySQL
regarding the Warning: Slow process detected", this is just a debug log to help me detect what script slows down things.
the only way to remove it is to increase/upgrade your hardware for a faster hardware
@DanielnetoDotCom , so I conclude this issue, with the relevant information that the errors were caused due to the performance of the shared server. After 8 days of testing, no additional errors occurred regarding MYSQL ([sqlDAL::readSql] (no mysqlnd) Prepare failed:
).
So running an AWS RDS with the configuration: db.t3.micro - 2 vCPU / 1 GiB RAM / Network: 2.085 Mbps.
@DanielnetoDotCom , as per my known case of shared server. I transferred mysql to AWS RDS, using the simplest configuration. For a performance test. The webserver/storage was not transferred:
Version: 8.0.28 Instance class: db.t2.micro vCPU: 1 RAM: 1 GB Multi-AZ: No Storage Type: General Purpose SSD (GP2) Storage: 20 GiB Provisioned IOPS: 0 Automatic Storage Scaling: Disabled
I find that now I still get errors that I saw in the past. But I get fewer errors. Could you tell me if these errors are related to performance or some specific configuration? sqlDAL mysql_dal.php