W3C home > Mailing lists > Public > www-validator-css@w3.org > November 2012

Timeout when testing batches of files through API

From: jama <jamappi@gmail.com>
Date: Sun, 25 Nov 2012 23:06:07 +0100
Message-ID: <50B2964F.7020601@gmail.com>
To: www-validator-css@w3.org
Hello there,

I'm trying to validate a few batches of CSS files (~50 files per batch)
through the web API.

I made sure to use time.sleep(2) in my python script that accesses the
API. While writing the python test script, I used just 4 files for
testing purposes. This worked fine for me, even when I "spammed" the
server with many quick tests (i.e. many requests in short amount of time).

But testing the whole batch didn't work quite as nicely. After about 9
files I got a timeout. I was probably put on a temporary blacklist by
the server so I couldn't immediately do another run with time.sleep(5).

Later I tried again with time.sleep(5), but I got a timeout again.

At [1] it is stated "*Note*: If you wish to call the validator
programmatically for a batch of documents, please make sure that your
script will|sleep|  for*at least 1 second*  between requests."

Why isn't this working for me? What am I doing wrong? Anyone got an idea?

By the way, I'm also using the script to test batches of XHTML files 
(~150 files
per batch) via [2]. There, I'm using time.sleep(3) and it's working 
fine. I can
check the whole batch without getting a timeout.


[1] http://jigsaw.w3.org/css-validator/manual.html#expert
[2] http://validator.w3.org/nu/
Received on Monday, 26 November 2012 08:01:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:49 UTC