Request timed out when working with Google Spreadsheets

870 views Asked by At

I'm having an issue that only happens with a handful of users that visit my website. Unfortunately I haven't been able to determine a cause of the problem as it is spread across different browsers as well as different OSs. Basically the majority of the users who visit the site do not have any issues, while I'd say about 10% still do. I myself do not experience the issue, and cannot replicate the issue on any of my other machines which makes testing difficult.

My website is simply using JavaScript to query a Google Spreadsheets. To view my site in action, visit here. Below is the bit of JavaScript I have in place:

<script type="text/javascript">
var visualization;

function drawVisualization() {

var query=new google.visualization.Query('http://spreadsheets.google.com/tq?key=0Ak7KLoetRqOddEJDNWwxaEFMQ0p2d1dVbFVtcVFoSXc&single=true&gid=7&output=html&usp=sharing');

query.setQuery('SELECT A, B, C, D, E, F, G, H where upper(A) like upper("%%") or upper(B) like upper("%%") or upper(C) like upper("%%") or upper(D) like upper("%%") or upper(E) like upper("%%") or upper(F) like upper("%%") or upper(G) like upper("%%") or upper(H) like upper("%%") order by A asc label A "Type", B "Name", C "Barrel", D "Manufacturer", E "Rarity", F "Element", G "Accessory", H "Code"');
query.send(handleQueryResponse);
}

function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
return;
}
var data = response.getDataTable();
visualization = new google.visualization.Table(document.getElementById('table'));
visualization.draw(data, {page: 'enable', pageSize: 50});
}
google.setOnLoadCallback(drawVisualization);
</script>

My initial research indicated that not including the "key" portion of the Google Spreadsheets URL will cause this issue, however mine is in place and correct. I tend to get about 15k hits a day, so I'm not sure if that could be the problem.

The only other thing that I can think of on my own is possibly too many users using the site at the same time?

0

There are 0 answers