[mapserver-users] disk space

Fawcett, David David.Fawcett at state.mn.us
Thu Oct 23 09:24:23 EDT 2008


Valerio, 
 
I think that most people just set up a cron job or a scheduled job on their server to delete all of the temporary images at some periodic interval.  (e.g. 24hrs, 12hrs, 1hr)  Your interfval would depend on the number of images that you are generating, disk space, etc.
 
In the code that you use to delete the files, you may want to look at the timestamps on the images and only delete images that are at least 1 minute old, so you don't accidentally delete an image before it can be used by the page that called it.
 
David.

	-----Original Message-----
	From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of valerio vianello
	Sent: Thursday, October 23, 2008 6:06 AM
	To: 'mapserver'; Venkat Rao Tammineni
	Subject: RE: [mapserver-users] disk space
	
	
Thanks for the quick reply,

When you run this function? after each requests ? but if so, the client is able to read the image before you delete it ?

best regards,

Valerio


--- Gio 23/10/08, Venkat Rao Tammineni <vtammineni at roulacglobal.com> ha scritto:


	Da: Venkat Rao Tammineni <vtammineni at roulacglobal.com>
	Oggetto: RE: [mapserver-users] disk space
	A: valerio.vianello at yahoo.it, "'mapserver'" <mapserver-users at lists.osgeo.org>
	Data: Giovedì 23 ottobre 2008, 13:05
	
	

	Hi,

	 

	  Why don't you write method  for deleting png .mapserver will take care about creating an image.I have  C# code.

	The below code will delete all the files form OutputDIR.

	 

	I hope it helps you. Or At least you can get some idea about your task.

	 

	Thanks and Regards

	Venkat.

	 

	public void Deleteimages()

	{

	            try

	            {

	                foreach (string f in System.IO.Directory.GetFiles(OutputDir))

	                {

	                    System.IO.File.Delete(f);

	                }

	            }

	            catch (Exception exp)

	            { }

	}

	 

	 

	From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of valerio vianello
	Sent: Thursday, October 23, 2008 4:25 PM
	To: mapserver
	Subject: [mapserver-users] disk space

	 

Dear all,

I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. 

Do you know how and when i can delete those temporary image since they are used only one time ?  

An attacker could easily  fill all the server HD  locking all the system.

Thanks

Valerio

	 

	
________________________________


	Scopri il Blog di Yahoo! Mail <http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F> : trucchi, novità, consigli... e scrivi la tua opinione!


________________________________

	Scopri il Blog di Yahoo! Mail <http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F> : trucchi, novità, consigli... e scrivi la tua opinione!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081023/c5d6e44f/attachment.html


More information about the mapserver-users mailing list