With full hard disk, 0 byte nsettings.cgi file

All notes and input on 2.0 Development are herein. <ul><li>Feature requests</li>
<li>Bug Reports</li>
<li>Beta Testing Feedback</li>
<li>Open Dev Discussion</li></ul>

Moderator: Coranto Moderator Team

With full hard disk, 0 byte nsettings.cgi file

Postby Gansos » Thu Sep 23, 2004 8:47 pm

I have noticed on two separate servers with two distinct Coranto installations, that if the volume or partition holding the Coranto files becomes full, Coranto will read the nsettings.cgi file, wipe it out, and then be unable to write back to the file (as the disk is full). This results 100% of the time in a 0 byte nsettings.cgi file.

Although server hard disks should not be full (or anywhere near it), it does happen from time time on smaller operations.

I propose that there be some form of error checking for this type of problem before trying to change nsettings.cgi, or at least a non-destructive method of reading nsettings. i.e. not earasing the file before trying to write to it. Maybe it is possible to do a test write before actually re-writing nsettings.cgi.

This suggestion is intended to make Coranto a more robust content management system. Nothing is worse than losing an nsettings.cgi file on a live site, even if you have a backup.
Gansos
 
Posts: 62
Joined: Thu Jan 11, 2007 8:33 pm

Postby cerberos76_ » Fri Sep 24, 2004 12:19 pm

You suggestion is understood.
What version of Coranto are you referring to?

That sort of non-destructive approach has been introduced for the profile files in the 1.30.x series. I need to check about the nsettings though.
Coranto addons:
* GuestPost, one click guestposting
* MoveIt!, Advanced Backup and site transfer
* PartialRebuild, CPU-friendly enhancement of FullBuild
* URLColumn, URLs for multiple Categories/Profiles
* Tickit!, Javascript News Tickers/Faders for Coranto!
* AddonEnabler, enables or disables single, multiple or all addons in one go
* SubmitMultiple, post consecutive news in an automatic loop!
* RSSAdvanced, RelatedNews ....

Get them at: http://coranto.gweilo.org/addons/
cerberos76_
 
Posts: 1339
Joined: Sun Mar 10, 2002 1:21 am

Postby Gansos » Fri Sep 24, 2004 4:37 pm

I am referring to version 1.20 and 1.22. I imagine this issues applies to other versions as well.
Gansos
 
Posts: 62
Joined: Thu Jan 11, 2007 8:33 pm

Re: With full hard disk, 0 byte nsettings.cgi file

Postby Parahead » Tue Sep 28, 2004 8:13 pm

gansos wrote:I propose that there be some form of error checking for this type of problem before trying to change nsettings.cgi, or at least a non-destructive method of reading nsettings. i.e. not earasing the file before trying to write to it. Maybe it is possible to do a test write before actually re-writing nsettings.cgi.
I have previously suggested an approach to take care of this problem in this thread. Actually the way newsdat.txt is written to can be improved as well as mentioned in this thread...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Gansos » Wed Sep 29, 2004 12:23 am

Well, it looks like you already have a solution that could be put into effect without much effort or new problem solving. Why doesn't someone just add this modification to the next revision of Coranto?

Indeed, this is a serious problem that has been around for some time. It ought to be squashed by now.
Gansos
 
Posts: 62
Joined: Thu Jan 11, 2007 8:33 pm

Postby Parahead » Wed Sep 29, 2004 6:39 am

gansos wrote:Well, it looks like you already have a solution that could be put into effect without much effort or new problem solving. Why doesn't someone just add this modification to the next revision of Coranto?
"someone" just has to find the time... ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby cerberos76_ » Wed Sep 29, 2004 2:52 pm

gansos wrote:I am referring to version 1.20 and 1.22. I imagine this issues applies to other versions as well.


You are right. A more secure mechanism is indeed necessary. i personally had never trouble in this area as I never had a large userbase of posters but it can be done. Another thing that will be added in the 1.30.x releases.
Coranto addons:
* GuestPost, one click guestposting
* MoveIt!, Advanced Backup and site transfer
* PartialRebuild, CPU-friendly enhancement of FullBuild
* URLColumn, URLs for multiple Categories/Profiles
* Tickit!, Javascript News Tickers/Faders for Coranto!
* AddonEnabler, enables or disables single, multiple or all addons in one go
* SubmitMultiple, post consecutive news in an automatic loop!
* RSSAdvanced, RelatedNews ....

Get them at: http://coranto.gweilo.org/addons/
cerberos76_
 
Posts: 1339
Joined: Sun Mar 10, 2002 1:21 am

Postby Feathers » Tue Mar 15, 2005 9:48 am

cerberos76 wrote:
gansos wrote:I am referring to version 1.20 and 1.22. I imagine this issues applies to other versions as well.


You are right. A more secure mechanism is indeed necessary. i personally had never trouble in this area as I never had a large userbase of posters but it can be done. Another thing that will be added in the 1.30.x releases.

It's certainly present in 1.24 and is very much the bane of my life - Coranto has a reputation as 'unstable' with our newsposters because of it, to the extent that we are starting to consider looking for something more 'robust' apparently.

If this could be resolved then I for one will be very happy! :cheers:
Feathers
 
Posts: 110
Joined: Wed Jan 10, 2007 6:06 pm
Location: London

Postby Feathers » Tue Mar 15, 2005 10:34 am

Here's a question:

Theoretically, could the SaveCConfig routine from the 1.30.x series be pasted into 1.24 as an interim resolution of this issue?
Feathers
 
Posts: 110
Joined: Wed Jan 10, 2007 6:06 pm
Location: London

Postby LoneOwl » Tue Mar 15, 2005 11:10 am

The root of all these problems lie with
Code: Select all
print $fh2 "$key``x$value\n" if $key && $value ne '';
It lacks error checking. Often verifying that print statements were successful is not done, although perhaps should be, as in this case. Personally, I was able to take a drive(ram disk actually), fill it with a file to take all the space(dd is nice), and then run a small perl script to open, print, and close, error checking for each. Here's what I get.
Code: Select all
No space left on device at - line 1.
A quick count gives 401 print statements, without looping, so it'd be pushing it to include it for each and every statement.

On a side note, has anyone ever truly noticed the proliferation of global variables in main?
User avatar
LoneOwl
 
Posts: 1465
Joined: Sun Mar 10, 2002 2:57 am
Location: That one place, you know?

Postby cerberos76_ » Tue Mar 15, 2005 12:23 pm

The problem of nsettings more secure writing has been rectified months ago in one of the 1.30.x versions.

I think servers should not run up to the last byte as it is anyway not good for caching mechanisms. But future versions do not have the huge problem of loosing nsettings for this lack of space.
Coranto addons:
* GuestPost, one click guestposting
* MoveIt!, Advanced Backup and site transfer
* PartialRebuild, CPU-friendly enhancement of FullBuild
* URLColumn, URLs for multiple Categories/Profiles
* Tickit!, Javascript News Tickers/Faders for Coranto!
* AddonEnabler, enables or disables single, multiple or all addons in one go
* SubmitMultiple, post consecutive news in an automatic loop!
* RSSAdvanced, RelatedNews ....

Get them at: http://coranto.gweilo.org/addons/
cerberos76_
 
Posts: 1339
Joined: Sun Mar 10, 2002 1:21 am

Postby Feathers » Tue Mar 15, 2005 12:46 pm

cerberos76 wrote:The problem of nsettings more secure writing has been rectified months ago in one of the 1.30.x versions.

Yes I saw that (I have the code).

What I was proposing though was pasting this code into my 1.24 installation to solve the problem (for me) with the current build. I can't see a problem with this but if someone has a sensible objection it would be helpful to hear about it!

(I'd like a 1.24.1 just to fix this problem but failing that I'm happy to mod my own installation)
Feathers
 
Posts: 110
Joined: Wed Jan 10, 2007 6:06 pm
Location: London

Postby Lumberjack » Tue Mar 15, 2005 2:19 pm

Yes this would be good, as it seems like it will take quite a while to get the stable versions to the 1.30 stage. I have only recently encountered this problem, and the point is well made that servers should not fill their hds completely, however it seems that some do and this should be a high priority concern for developers.
Recently I have resorted to making a backup of nsettings.cgi after every change I make to profiles etc.
Lumberjack
 
Posts: 555
Joined: Wed Jan 10, 2007 7:22 pm
Location: Oxford, UK

Postby Feathers » Tue Mar 15, 2005 3:41 pm

Lumberjack wrote:Recently I have resorted to making a backup of nsettings.cgi after every change I make to profiles etc.

As have I though the small fact of 'No FTP access from work' still means a possible wait of up to 8hrs before a problem is resolved.

Unless someone comes forward with a reason why this is a bad idea (or why I shouldn't do it), I'm going to go for my own personal 1.24+ modification later today (though looking at it, I'm not convinced my problems always result in a 0kb file in which case this code won't help anyway).
Feathers
 
Posts: 110
Joined: Wed Jan 10, 2007 6:06 pm
Location: London

Postby LoneOwl » Tue Mar 15, 2005 4:57 pm

The code in SaveCConfig is dependent on the build version. Unless you know perl I wouldn't suggest attempting it. One thing to note is that Coranto has had many developers with different styles, so even sorting through it all can be interesting. Unless you're aware of all the little things, you could run into serious trouble.

And as always, if you use alpha code, editted yourself, and put into a stable release, you're technically on your own.
User avatar
LoneOwl
 
Posts: 1465
Joined: Sun Mar 10, 2002 2:57 am
Location: That one place, you know?

Next

Return to Coranto 2.0 Development

Who is online

Users browsing this forum: No registered users and 0 guests