I write an application that create and batch feed uisng Google Base
Api.
Steps will reproduce my problem:
1. Create Feed;
2. Add Entry;
3. Batch Feed;
After the 3° step I got a "Timeout Exception".
Here's my web.config:
<httpRuntime maxRequestLength="1550000" executionTimeout="600" />
My code is like this:
GBaseFeed gBFeed = new GBaseFeed(GBaseUriFactory.Default.ItemsFeedUri,
gBService);
gBFeed.Title = new AtomTextConstruct
(AtomTextConstructElementType.Title,
"Lindestore.com Products Feed");
AtomLink atmLink = new AtomLink(AtomLink.HTML_TYPE,
BaseNameTable.ServiceAlternate);
atmLink.HRef = new AtomUri("http://www.lindestore.com/eng/");
gBFeed.Links.Add(atmLink);
gBFeed.Updated = DateTime.Now;
gBFeed.Authors.Add(new AtomPerson
(AtomPersonType.Author,"Lindestore.com"));
GDataBatchFeedData gDataBathcFeed = new GDataBatchFeedData();
gDataBathcFeed.Type = GDataBatchOperationType.update;
gBFeed.Batch = "http://www.google.com/base/feeds/items/batch";
gBFeed.BatchData = gDataBathcFeed;
// Add entries
foreach (...)
{
GBaseEntry gBEntry = new GBaseEntry();
gBEntry.BatchData = new GDataBatchEntryData("product id",
gDataBathcFeed.Type);
// ... set entry property
gBFeed.Entries.Add(gBEntry);
}
// Run batch
GBaseFeed gBfResult = gBService.Batch(gBFeed, new Uri(gBFeed.Batch,
UriKind.Absolute));
/*
HERE I get a time out exception:
Inner Exception: Execution of request failed:
http://www.google.com/base/feeds/items/batch
Stack Trace:
System.Web.HttpUnhandledException: Generata eccezione di tipo
'System.Web.HttpUnhandledException'. --->
Google.GData.Client.GDataRequestException: Execution of request
failed:
http://www.google.com/base/feeds/items/batch --->
System.Net.WebException:
Timeout dell'operazione.
in System.Net.HttpWebRequest.GetResponse()
in Google.GData.Client.GDataRequest.Execute()
--- Fine dell'analisi dello stack dell'eccezione interna ---
in Google.GData.Client.GDataRequest.Execute()
in Google.GData.Client.GDataGAuthRequest.Execute(Int32
retryCounter)
in Google.GData.Client.GDataGAuthRequest.Execute()
in Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase
baseEntry, GDataRequestType type, AsyncSendData data)
in Google.GData.Client.Service.Batch(AtomFeed feed, Uri batchUri,
AsyncSendData data)
in Google.GData.Client.Service.Batch(AtomFeed feed, Uri batchUri)
in Google.GData.GoogleBase.GBaseService.Batch(GBaseFeed feed, Uri
batchUri)
*/
In the past I read this post:
1-
http://groups.google.com/group/Google-Base-data-API/tree/browse_frm/month/2007-06/80ded47f6ffaa88d?rnum=91&_done=%2Fgroup%2FGoogle-Base-data-API%2Fbrowse_frm%2Fmonth%2F2007-06%3F#doc_273917b40500151f
2-
http://groups.google.com/group/Google-Base-data-API/browse_thread/thread/5c996ee093fbe75e/8b14ef073c73f6a2?lnk=gst&q=max+upload+limit#8b14ef073c73f6a2
3-
http://code.google.com/support/bin/answer.py?answer=70686&useful=1&show_useful=1
What I understand is that my feed must be less then 1MB and
before execute batch process I split my product list in to many feed
to ensure that
each feed is less than 1MB.
In the past I trying to decrease (now 300 entry per feed, in the past
150) the
entries number for each feed but the result was the same (timeout
exception).
I open an Issue on google code api:
http://code.google.com/p/google-gdata/issues/detail?id=263
Sorry for my english.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Base Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Base-data-API?hl=en
-~----------~----~----~----~------~----~------~--~---