motomac Posted February 27, 2019 Posted February 27, 2019 Topics created 2 days ago have 0 views, but it's incorrect value: The viewupdates task is stuck. Errors and System logs don't have any entries about this problem. I'm using Redis for caching and Elasticsearch. PHP 7.1.12 max_execution_time is 30. Also the option Use Redis to reduce MySQL overhead is enabled:
bfarber Posted February 27, 2019 Posted February 27, 2019 If you unlock the task and then manually run it, does it complete then? If not, you may wish to submit a ticket for support.
motomac Posted February 28, 2019 Author Posted February 28, 2019 When I run it manually the whole page stuck. White screen with endless waiting/loading. However, it finished after a very long time, but counters haven't been updated. I switched off the option "Use Redis to reduce MySQL overhead", rerun the viewupdates task and topic view counters started working. Apparently, the option "Use Redis to reduce MySQL overhead" doesn't work correctly.
bfarber Posted February 28, 2019 Posted February 28, 2019 10 hours ago, motomac said: When I run it manually the whole page stuck. White screen with endless waiting/loading. However, it finished after a very long time, but counters haven't been updated. I switched off the option "Use Redis to reduce MySQL overhead", rerun the viewupdates task and topic view counters started working. Apparently, the option "Use Redis to reduce MySQL overhead" doesn't work correctly. That's not exactly accurate. We use it extensively in fact. This just means that there were a lot of views stored in Redis, and when you turned that option off the task began looking for views in the database instead, but since there were none it was able to complete quickly. My recommendation is to submit a ticket.
motomac Posted March 4, 2019 Author Posted March 4, 2019 Apparently, the problem was in the views column in forum_topics table. The value exceeded the limit of INT(10): UPDATE `forums_topics` forums_topics SET `views`=`views`+1263 WHERE tid=24130 Out of range value for column 'views' at row 1 Currently, the value is: 2147483369 #0 /var/www/site.com/system/Db/Db.php(990): IPS\_Db->preparedQuery('/*IPS\\core\\task...', Array) #1 /var/www/site.com/applications/core/tasks/viewupdates.php(119): IPS\_Db->update('`forums_topics`...', '`views`=`views`...', 'WHERE tid=?') #2 /var/www/site.com/applications/core/tasks/viewupdates.php(53): IPS\core\tasks\_viewupdates->update('IPS\\forums\\Topi...', 24130, 1263) #3 [internal function]: IPS\core\tasks\_viewupdates->IPS\core\tasks\{closure}() #4 /var/www/site.com/system/Task/Task.php(347): call_user_func(Object(Closure)) #5 /var/www/site.com/applications/core/tasks/viewupdates.php(99): IPS\_Task->runUntilTimeout(Object(Closure)) #6 /var/www/site.com/system/Task/Task.php(248): IPS\core\tasks\_viewupdates->execute() #7 /var/www/site.com/system/Task/Task.php(217): IPS\_Task->run() #8 /var/www/site.com/applications/core/interface/task/task.php(62): IPS\_Task->runAndLog() #9 {main} I can't believe I have the first IPS forum which has a topic with >2.1 billion views 🤔 Fixed it by making a view column UNSIGNED. And I recommend everybody to do the same 😄 P.S. My license is expired, so I can't get any help from tickets.
maddog107_merged Posted March 4, 2019 Posted March 4, 2019 Our top view is only 500million, but +1 it would be a concern in the future. Can we make this column bigger?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.