I am working on a website in Ruby on Rails and have enabled log rotation on the server with the reference of blog article.
I have written the following code in my /etc/logrotate.conf file.
/path/to/your/rails/applicaton/log/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}
But I still happen to get this error once in 2 weeks:
Errno::ENOSPC: No space left on device - <STDERR>
In this case I have to remove the log files manually which is a cause of worry. I have rechecked my settings.
Please suggest why this issue comes even after rotating log daily or how I can I rotate my logs more frequently or any better way to escape this error.
Many Thanks!!
Related
Playing on a linux hosted AzerothCore rev. be423a91b535 master branch.
Whenever as a paladin I hit a target with my abilities and then someone else swings at it the entire server crashes. The only error that shows up in log is this.
We've tested this with multiple characters on multiple accounts and and in all instances after casting either of my judgement of light, or judgement of mana causes the server to crash completely when another character swings at said target.
It does not happen if I do not use these abilities and just attach the target at the same time with another player.
This is a clean server recently set up, no additional modules or changes beyond lowering guild signing size.
error image
I've also gotten a snapshot of the server config if that has useful information.
Server config
Apparently there was a module added QAston Proc, and this causes world crashes. If anyone else has this issue updating should clear it up as the commit was removed.
We have recently planned to switch from SQLite to Realm in macOS and iOS app due to db file corruption issue with SQLite so we first started with macOS app. All coding changes were smooth and app started working fine.
Background about app and DB usage - app really uses DB very heavily and performs too many read and writes to DB in each minute and saves big xml's to it. In each minute it writes / updates around 10-12 records (at max) with xml and reads 25-30records too. After each read it deletes data along with xml from database and my expectation is once data is deleted it should free up space and reduce file size but looks like it is growing continuously.
To test the new DB changes we kept app running app 3-4 days and DB file size went to 64.42GB and app started being slow. Please refer the attached screen shot.
To further debug, I started app with new DB file and size was 4KB but within 5min it goes to 295KB and never reduced in size even records were continuously added and deleted.
To further clarify, app uses NSThreads to perform various operations and those threads writes and reads data to DB but with proper begin\commit transactions. I also read at 'Large File Size' at https://realm.io/docs/java/latest/#faq and tried to find compactRealm but can't find it in objective c.
Can anybody please advise.
Update - I Give up on Realm
After 15days of efforts, Finally I have stopped usage of Realm and starting to fix/workaround db file corruption issue with SQLite. Realm Huge DB file issue was fixed by making changes to code for threads but then I started getting Too many open files error after running the app for 7-8 hours.
Debugged for whole week and made all possible changes and at some point looks like all was good as xcode were not showing any open files. But again I started getting Too many open files crash and then debugged with instrument and found there were so many open files to realm database, lock, commit and cv files.
I am sure there are no leaks in app and xcode also does not shows those open files in Disk usage as well. I decided to invoke lsof command in code before and after Realm calls and most of the it doesn't increase open file count but sometime n between it increases. In My app it started from 120 files to 550 in around 6 hours. Xcode looks all fine via Disk usage but instrument shows open files.
No good support from Realm team, sent email to them, just got one response. Made many changes to code following their suggestions and doesn't work at all so gave up on it. I think it's good for small apps only.
I'm trying to upload new images to iTunes Connect. However, they continue to fail. I've checked many many times now and no dice. The screenshot sizes match Apple's requirements. Saving it as a .jpg continues to fail. Saving it as a .png with no Alpha continues to fail. Spent most of my work day on here finding other solutions that I've tried and still fails.
Other things I tried was using different browsers, saving the image file as generic as possible (ex. 1.png, and I've tried using screenshots pulled from an actual device as well as the Xcode simulator.
I am trying to do this via a windows machine. Has anybody been able to successfully upload screenshots through iTunes Connect using a Windows machine? At this point that is the only thing I can think of as to why it continues to fail.
Try waiting... in my experience, iTunes connect is not all that reliable, and waiting a day solved the screenshot upload issue for me.
Also, if you have not already, open the screenshots in an image editor, and insure they are exactly the right size... I have found that my screenshots always end up a pixel to skinny for some reason.
Lastly, keep in mind new rules for the iPhone 6 and 6 Plus.
I'm working on a iOS 6 app, and am using a SQLite database to store data. At startup the app does a select on the database and displays the results on the first screen.
However I've started to get an "Database disk image is malformed" error when trying to run the select.
The strange thing is that I can use SQLite browser, http://sqlitebrowser.sourceforge.net/, to do the select on the database in the project folder. But if I try to open the database after it has been copied to the simulator folder, /Users//Library/ApplicationSupport/iPhone simulator/6.0/Applications/... then I get a disk image is malformed.
The database is not being accessed by a background thread, nor am I using breakpoints to halt execution as is being suggested as a reason here sqlite database disk image malformed on iPhone SDK.
No more than one execution being done on the database at once.
All hints, tips and possible solutions are appreciated.
I've found out that this had something to do with me bundling a rather large database file with the app (larger than 3 GB). I've fixed the problem by doing a in-app download of the data over wifi. This caused the database error to fade away.
I had a joomla 1.5 site for a couple of years on a linux cpanel - everything was running fine. Last week we moved it to a new linux server and now we have a strange problem. The general navigation etc works fine but linking to pdfs seems to have gone "Random". For example there are 4 pdf links on this page http://www.coinstreet.org/spacehire/conferencemeetings.html - they all have different links. However, for 3 of them the same pdf is downloaded (despite the different links) and one doesn't work at all - get a 406 error.
The new install was taken by doing a straight backup of the cpanel and then a re-install. All other functionality seems to be fine.
I am at a bit of a loss - so any suggestions would be gratefully received!
PS Just noticed that I see a lot of lines like this in the error logs
[Sat Mar 31 14:50:10 2012] [error] [client 65.92.86.225] File does not exist: /data03/c9566644/public_html/406.shtml, referer: http://www.coinstreet.org/images/stories/coinstreet/JDPS%20Childcare%20Assistant.pdf
don't know if that's relevant?
UPDATE
I created a test link to fred.pdf that DIDN'T exist on the server. WHen the link is clicked rather than giving an error as expected a pdf was downloaded. TUrns out that several pdfs are missing it seems and that this same file is downloaded. When I put a fred.pdf on the server then the test link worked as expected. So, where is this "Wrong" pdf coming from...
ANother update
I have now discovered that the same problem was happening on the old server... too oh boy!
Also, the mystery pdf that downloads is actually part of one of the articles on the site, turned into a pdf on the fly. If I unpublish that article then I get just a blank pdf appear. Time to look closely at the .htaccess file me thinks... anyone else got any thoughts?
I believe you have the filename typed in wrongly!
The link you have on your site:
http://www.coinstreet.org/images/stories/coinstreet/Meeting%20Space%20User%20Special%20Requirements%20Policy3.pdf
The link I used to see the PDF successfully:
http://www.coinstreet.org/images/stories/coinstreet/Meeting%20Space%20User%20Special%20Requirements%20Policy(3).pdf
Notice the ( ) around the 3
I think you are seeing the results of two different effects here:
a) Some form of incorrect encoding when the files were uploaded - clearly the spaces and extended characters in the file name are being url encoded prior to saving. I've seen ftp programs do this and I've also seen Joomla do this periodically. I don't know if cPanel backups don't sometimes do this too. Best advice I can give is to always rename files to remove spaces(swapping for hyphens) as well as stripping brackets, ampersands and exclamation marks (bangs). Train users to do likewise to avoid these issues - and check error logs periodically to pick up on anything you miss or that changes.
b) Now with your requests for the files not matching the actual filename you would expect to see 404 errors - but sometimes you get a file, not always the right one though. My guess here is that you have the apache module that attempts to match files based on misspellings - sorry can't recall the exact name off hand. A quick search shows mod_speling (mis-spelling of spelling is deliberate) is the most likely contender.