NATION

PASSWORD

Scripts banned

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.

Advertisement

Remove ads

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Thu Apr 08, 2010 12:08 am

Okay, I've written up some rate-limiting code for the API. Will drop it in tomorrow I think. It will automatically ban sources for 15 minutes if they send a flood of requests (more than 100/minute). That way you can experiment without risking getting locked out for hours or days.

There's a WinHttpRequest script on lunarmani.com hitting us up to half a million times per day, so that one will need some work too.
Last edited by [violet] on Thu Apr 08, 2010 12:08 am, edited 1 time in total.

User avatar
NewTexas
Spokesperson
 
Posts: 181
Founded: Antiquity
Civil Rights Lovefest

Postby NewTexas » Thu Apr 08, 2010 5:00 am

[violet] wrote:Unbanned 209.132.230.240.

I'll get back to you about the rest; just going over our API stats atm.


Thank you.
Big Tex
Governor of Texas

Author: NSDossier

User avatar
Winnipeg
Bureaucrat
 
Posts: 52
Founded: Antiquity
Ex-Nation

Postby Winnipeg » Thu Apr 08, 2010 6:46 am

I've disabled all of my feed scraping scripts for the time being (except the new Message Board Feed as that one already limits itself to 5 seconds between requests), so I can make sure they aren't excessively hitting the server.
Last edited by Winnipeg on Thu Apr 08, 2010 6:47 am, edited 1 time in total.
Robin 'Winnipeg' Morrison
Creator of WinniVision(TM)
Home of the West Pacific

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Thu Apr 08, 2010 4:15 pm

FYI, here are some stats on nationdata.cgi requests over the last 20 hours:

Code: Select all
    Hits IP Address
  137742 67.210.106.242
   46426 208.113.238.141
    8404 208.77.96.72
     940 67.195.112.181

User avatar
Winnipeg
Bureaucrat
 
Posts: 52
Founded: Antiquity
Ex-Nation

Postby Winnipeg » Thu Apr 08, 2010 6:55 pm

That last one is a Yahoo Crawler.

I'm somewhat ashamed to admit that the second one was me, but you should see that one drop substantially tonight.
Robin 'Winnipeg' Morrison
Creator of WinniVision(TM)
Home of the West Pacific

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Thu Apr 08, 2010 11:44 pm

Winnipeg wrote:the second one was me

I noticed odd behavior from that one. It seems to have two flavors: a speed-limited version that queries "nationdata/" (with a trailing slash) once every 10 seconds, and an out-of-control version that queries "nationdata?" (with a trailing question mark) in wild bursts of dozens of requests per second.

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Fri Apr 09, 2010 12:15 am

[violet] wrote:I've written up some rate-limiting code for the API.

Created a new thread to announce this: viewtopic.php?f=15&t=45424

User avatar
Winnipeg
Bureaucrat
 
Posts: 52
Founded: Antiquity
Ex-Nation

Postby Winnipeg » Fri Apr 09, 2010 6:39 am

The rate limited one was probably my regular census app...the other one was a UN Endorsment type scripty thingy, which I've shut down now because I'm not sure how I would do up to date endo counts for a region like TWP without going way too hard on the API so as it stands right now I won't be ressurecting that one (already got the usual "Don't say it's so" or "OH NOES!" from my users :p)

Census one I will work on again but will be trying to slow it down some more just to make sure it's not beating anyone up.
Robin 'Winnipeg' Morrison
Creator of WinniVision(TM)
Home of the West Pacific

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Fri Apr 09, 2010 4:08 pm

The census one (trailing slash) seems totally fine, from my eyeballing of the logs -- one request every 10 seconds is well within the limit (6/minute compared to 100/minute).

User avatar
Ballotonia
Senior Admin
 
Posts: 5494
Founded: Antiquity
Democratic Socialists

Postby Ballotonia » Thu Apr 22, 2010 1:23 am

I only run my scripts once in several weeks, so it took me a while to run into this one too. My appologies!

Got a "420 Unused Error" and a "421" as well, so it took me a while to figure out what the problem was. Fortunately, after some time the server functioned again and my now slowed down (1 Get per second max) scripts are working again.

So, if you see my IP in the log as bumping into the limit of >1 Get per second, please know the problem has already been fixed on my end.

Ballotonia
"Een volk dat voor tirannen zwicht zal meer dan lijf en goed verliezen, dan dooft het licht…" -- H.M. van Randwijk

User avatar
Fostonia2
Political Columnist
 
Posts: 3
Founded: May 10, 2010
Ex-Nation

Postby Fostonia2 » Mon May 10, 2010 10:25 am

Ah, so that's why NSTracker stopped getting all the nations during its daily data pull :oops:. I've already updated my NSTracker code to pull 50 records at a time, every 5 minutes, until it updates all of its trackers, just figured I'd let you know that my server was one of those IP's that might have been problematic.

User avatar
Fostonia2
Political Columnist
 
Posts: 3
Founded: May 10, 2010
Ex-Nation

Postby Fostonia2 » Mon May 10, 2010 11:29 am

I've added a local database 8-hour cache to NSTracker for normal stats viewing (the historical graphs will still use info from the daily [midnight central time] pulls). NSTracker may not be popular enough to cause too many problems, but it couldn't hurt. ;)

User avatar
Zemnaya Svoboda
Diplomat
 
Posts: 867
Founded: Jan 06, 2004
Civil Rights Lovefest

Postby Zemnaya Svoboda » Sat Jun 05, 2010 3:24 pm

Not to be a gravedigger but I have a tool which I call curld which I made to throttle myself.

It's a C daemon which accepts requests on a port and makes the requests itself and then delivers the results to the requestor. Unfortunately it's currently without any kind of authentication or control. Perhaps I should simply move it to a local socket before publishing it to you guys.

Previous

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Giovanniland, Queroquestan

Advertisement

Remove ads