FireWire Posted April 6 Share Posted April 6 The lastrun log file accumulates a lot of entries and is never automatically pruned/cleared. Production server has a ~50mb file with 1.5 million entries. The log file contents are not written in a way that ProcessWire can parse. Is this log file necessary for RM to function properly? The log entries are accumulating even when migrations are disabled. 1 Link to comment Share on other sites More sharing options...
FireWire Posted April 6 Author Share Posted April 6 @bernhard Admittedly I just had to run some updates to the server firewall because we were getting hit with serious amounts of malicious traffic, so I don't think these may be numbers most RockMigrations users are going to see haha. Link to comment Share on other sites More sharing options...
bernhard Posted April 7 Share Posted April 7 Hey @FireWire thx for the report! This was partly intended and partly not. The intentional part was that it SHOULD log something if migrations are triggered but disabled (to make it obvious if somebody expects migrations to do something and nothing happens). What was also intentional is that the file does only reset when migrations actually run. The idea was to save disk read/write operations. What was NOT intentional though is that this logging took place on every single request, which obviously means a small performance penalty on each request when using RockMigrations - even when it is disabled. I just pushed a fix for this to v6.8.2 https://github.com/baumrock/RockMigrations/commit/429ce68f3418aeedee108d80949fc14a224561a5 Now the logging only happens when $config->debug is enabled. I also removed the log regarding MagicPages, which was logging on every single request, adding an additional file write on every single request 😮 Thank you for making me aware of that! 1 1 Link to comment Share on other sites More sharing options...
FireWire Posted April 7 Author Share Posted April 7 @bernhard Excellent! It took 6 months and a bot attack to get to that number. We were getting many requests per second so this is probably not something many users experience. I'll call it "accelerated testing" 🤣 Thanks for the fix! Link to comment Share on other sites More sharing options...
bernhard Posted April 7 Share Posted April 7 Either way it should not log something on each request. The goal is that RockMigrations does not slow down the site and only does something when it really needs to do something. This was obviously not the case here even though a single fileputcontents() might not be a noticeable penalty, but still... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now