500 Error on SEOMoz Links API.

33 views
Skip to first unread message

Ronn Chopra

unread,
Oct 19, 2011, 2:27:03 PM10/19/11
to SEOmoz API
Hi,

I am using the SEOMoz PHP client library to get the backlink data for
around 3,000 URL's.

I am fetching the top 100 domain-to-domain backlinks for each of the
3000 URL. The problem is, I keep getting 500 errors at random.
Sometime the error will appear after getting the data for 5 URLs and
sometime it wont appear for 300 URL's and then randomly strike again.
Of course the application is set to quit upon receiving a 500 error.
Here is an example of the 500 response.

'url' => string 'http://lsapi.seomoz.com/linkscape/links/
www.seomoz.org?Scope=domain_to_domain&Filter=external&Sort=domain_authority&SourceCols=42394552733001981&Offset=0&Limit=100'
(length=176)
'content_type' => string 'text/plain' (length=10)
'http_code' => int 500
'header_size' => int 202
'request_size' => int 298
'filetime' => int -1
'ssl_verify_result' => int 0
'redirect_count' => int 0
'total_time' => float 7.563
'namelookup_time' => float 0
'connect_time' => float 3.031
'pretransfer_time' => float 3.031
'size_upload' => float 0
'size_download' => float 0
'speed_download' => float 0
'speed_upload' => float 0
'download_content_length' => float 0
'upload_content_length' => float 0
'starttransfer_time' => float 7.563
'redirect_time' => float 0

I get no error code, error text or anything related with the response.
Just a 500 HTTP_CODE and empty response. Is the SEOMoz link service
undergoing some sort of maintenence?

Carin Overturf

unread,
Oct 19, 2011, 4:20:35 PM10/19/11
to SEOmoz API
Hey Ronn,

Sporadic 500s from the API can happen when load is high or a call is
taking a long time. The recommended implementation would be to not
have a 500 lead to quitting the application, but instead creating an
exponential back off to keep retrying.

It is important to make this is an exponential back off in case the
API really is down, but if you receive a 500, the application could
wait for 3 seconds and try again. If another 500 is returned, wait 6
seconds and try again, etc.

I hope this helps! If this still doesn't work, email he...@seomoz.org
to create a ticket and we can look into it a bit closer or you can
also post a question on the Linkscape API forum:
http://seomoz.zendesk.com/categories/6328-seomoz-apis-and-extras

Thanks!
Carin


On Oct 19, 11:27 am, Ronn Chopra <funkymil...@gmail.com> wrote:
> Hi,
>
> I am using the SEOMoz PHP client library to get the backlink data for
> around 3,000 URL's.
>
> I am fetching the top 100 domain-to-domain backlinks for each of the
> 3000 URL. The problem is, I keep getting 500 errors at random.
> Sometime the error will appear after getting the data for 5 URLs and
> sometime it wont appear for 300 URL's and then randomly strike again.
> Of course the application is set to quit upon receiving a 500 error.
> Here is an example of the 500 response.
>
>   'url' => string 'http://lsapi.seomoz.com/linkscape/links/www.seomoz.org?Scope=domain_to_domain&Filter=external&Sort=domain_aut...

Rohit Chopra

unread,
Oct 20, 2011, 11:17:18 PM10/20/11
to seomo...@googlegroups.com
Carin,

This was very helpful. We have updated our implementation like you suggested and seems to be working just fine. I still see some 500 errors every now and then, but the exponential back off loop idea was great.

Thank you,

Regards,
Ronn

--
You received this message because you are subscribed to the Google Groups "SEOmoz API" group.
To post to this group, send email to seomo...@googlegroups.com.
To unsubscribe from this group, send email to seomoz-api+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/seomoz-api?hl=en.




--
Rohit Chopra
http://www.theblueskull.com

Carin Overturf

unread,
Oct 21, 2011, 11:44:52 AM10/21/11
to seomo...@googlegroups.com
Hey Ronn,

Good to hear!! Glad it helped!

Thanks,
Carin
Thanks,

Carin Overturf
Technical Project Manager


Reply all
Reply to author
Forward
0 new messages