Delete Files from GAE

12 views
Skip to first unread message

phrozen77

unread,
Jul 28, 2010, 7:27:16 AM7/28/10
to CirruxCache
Hi,

Got a file "stuck" on GAE with an expiry date of mid-August that i've
already deleted from the datastore 3 or 4 days ago but it is still
being served on request. Problem is, the .js itself contains a wrong
path causing lots of 404 errors in the webserver log and due to the
error also causes some functionality to not work :(

So, since the .js is no longer in the datastore list, i obviously
can't delete it anymore and if i wait till it expires - well, that's
still more than 2 weeks to wait :/

Do you have an idea how i could clear (all?) files from the datastore
(which i kinda already did with the webinterface, other static
resources like pictures have then been re-requested by cirruxcache)
and purge any eventual caches (memcached?) they have?

Samuel Alba

unread,
Jul 28, 2010, 11:27:11 AM7/28/10
to cirru...@googlegroups.com
Hi,

I think there is still a bug on the purging webservice, I think the
object remains in memcache. Until I find a fix and release it in the
next version, you could try to flush the object manually by doing a
request using curl like this:

$ curl -X DELETE http://your.domain.tld/path/to/file.js

After that, you can also try to flush memcached objects to ensure
getting rid of any stale content:

$ curl -X DELETE http://your.domain.tld/<base url>/__ALL__\?memcache

You should receive the message "Memcache flushed.".

Let me know about that.

Best,

Samuel

> --
> Project page: http://code.google.com/p/cirruxcache/
> News: http://www.shad.cc/tag/cirruxcache
> Groups: http://groups.google.com/group/cirruxcache
>


--
Samuel Alba

phrozen77

unread,
Jul 29, 2010, 2:11:47 AM7/29/10
to CirruxCache
Hm, where would i do that though?

Just from my normal, local shell?

When i do that, i get "Forbidden" for the first command and "None" for
the second :(

On Jul 28, 5:27 pm, Samuel Alba <sam.a...@gmail.com> wrote:
> Hi,
>
> I think there is still a bug on the purging webservice, I think the
> object remains in memcache. Until I find a fix and release it in the
> next version, you could try to flush the object manually by doing a
> request using curl like this:
>
> $ curl -X DELETEhttp://your.domain.tld/path/to/file.js
>
> After that, you can also try to flush memcached objects to ensure
> getting rid of any stale content:
>
> $ curl -X DELETEhttp://your.domain.tld/<base url>/__ALL__\?memcache

Samuel Alba

unread,
Jul 29, 2010, 7:32:45 AM7/29/10
to cirru...@googlegroups.com
You need to explicitly authorized your IP to send DELETE request.

To do that, fill the variable named "allowFlushFrom" to your IP
following the form below:
allowFlushFrom = ['x.x.x.x']

(replace with your public ip from whatismyip.com for instance).

You can read http://code.google.com/p/cirruxcache/wiki/PoP for more details.

Yes the commands need to be executed from your local shell ;)

Try to do it, and if you fail, please copy/paste your app.py config
(only PoP section will be enough, adding your url mapping), and the
executed curl commands.

Let me know.

Sam

phrozen77

unread,
Jul 29, 2010, 3:20:40 PM7/29/10
to CirruxCache
Yay, that did the trick - i think this is a topic for the FAQ :)

On Jul 29, 1:32 pm, Samuel Alba <sam.a...@gmail.com> wrote:
> You need to explicitly authorized your IP to send DELETE request.
>
> To do that, fill the variable named "allowFlushFrom" to your IP
> following the form below:
> allowFlushFrom = ['x.x.x.x']
>
> (replace with your public ip from whatismyip.com for instance).
>
> You can readhttp://code.google.com/p/cirruxcache/wiki/PoPfor more details.

Samuel Alba

unread,
Feb 11, 2011, 2:48:53 PM2/11/11
to Zuko, CirruxCache
Unfortunately not yet, but I plan to add in the next release. Keep in touch :-)

Let me know if you have another idea to implement.


On Fri, Feb 11, 2011 at 3:02 AM, Zuko <zack...@gmail.com> wrote:
> May be we can have something like...
>
> http://appname.appspot.com/path/to/file.js?request=del&key=secretkey


>
>
> On Jul 29 2010, 4:32 pm, Samuel Alba <sam.a...@gmail.com> wrote:
>> You need to explicitly authorized your IP to send DELETE request.
>>
>> To do that, fill the variable named "allowFlushFrom" to your IP
>> following the form below:
>> allowFlushFrom = ['x.x.x.x']
>>
>> (replace with your public ip from whatismyip.com for instance).
>>

>> You can readhttp://code.google.com/p/cirruxcache/wiki/PoPfor more details.

--
Samuel Alba
@sam_alba

Zuko

unread,
Feb 20, 2011, 1:44:33 AM2/20/11
to CirruxCache
I have edgecast a/c and don't mind giving you access ;)


Another ideas...

We pass file to delete controller
http://appname.appspot.com/DELETE/path/to/file.js

Lengthy and hard work but furusitic...once for all!
Creating restful API
API keys placed in config file


On Feb 12, 12:48 am, Samuel Alba <sam.a...@gmail.com> wrote:
> Unfortunately not yet, but I plan to add in the next release. Keep in touch :-)
>
> Let me know if you have another idea to implement.
>
>
>
> On Fri, Feb 11, 2011 at 3:02 AM, Zuko <zack4...@gmail.com> wrote:
> > May be we can have something like...
>
> >http://appname.appspot.com/path/to/file.js?request=del&key=secretkey
>
> > On Jul 29 2010, 4:32 pm, Samuel Alba <sam.a...@gmail.com> wrote:
> >> You need to explicitly authorized your IP to send DELETE request.
>
> >> To do that, fill the variable named "allowFlushFrom" to your IP
> >> following the form below:
> >> allowFlushFrom = ['x.x.x.x']
>
> >> (replace with your public ip from whatismyip.com for instance).
>
> >> You can readhttp://code.google.com/p/cirruxcache/wiki/PoPformore details.
Reply all
Reply to author
Forward
0 new messages