Loading...

youtube-api-gdata@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[YouTube-API] Re: Direct Uploads Server Migration Clay Wright Fri Oct 30 12:00:27 2009

Jeff:

I made the modification (I think) to the AuthFactory Timeout.  However, I am
still receiving the same error so I think I am missing something and hope
you can help me out by showing me the codeline I am missing or point me to
another case that has the correct format for the the timeout.


Dim settings As New YouTubeRequestSettings("example app", "testapp",
developerkey, uid, pwd)

Dim request1 As New YouTubeRequest(settings)

Dim authFactory As New GAuthSubRequestFactory(YouTubeService.YTService, "BEE
MD")

authFactory.KeepAlive = True

Dim service As New YouTubeService(authFactory.ApplicationName,
"BeeFFApplication", developerkey)

DirectCast(service.RequestFactory, GDataRequestFactory).Timeout = 9999999


Thanks,
Clay Wright


On Thu, Oct 22, 2009 at 2:08 PM, Jeffrey Posnick <[EMAIL PROTECTED]> wrote:

>
> Hello Clay,
>
>  There is no need to increase the timeout in every possible instance
> variable. Just take the specific YouTubeRequest object you're using,
> and modify the Timeout property of the request's
> Service.RequestFactory instance.
>
>  The code you just posted doesn't illustrate you modifying the Timeout
> belonging to the Service.RequestFactory associated with request1.
>
> Cheers,
> -Jeff Posnick, YouTube API Team
>
>
> On Oct 22, 1:51 pm, Clay Wright <[EMAIL PROTECTED]> wrote:
> > Hi Jeff:
> >
> > I tried increasing the client timeout and possibly you can tell me where
> I
> > am going wrong.   Here is the snippet of code I am using.  As you can see
> > anywhere there was an option for a time out that is what I put.  So, if I
> am
> > missing something please let me know.
> >
> > Thanks,
> >
> > Clay
> >
> > Dim settings As New YouTubeRequestSettings("example app", "testapp",
> > developerkey)
> >
> > Dim request1 As New YouTubeRequest(settings)
> >
> > settings.Timeout = 60 * 60 * 1000
> >
> > request1.Settings.Timeout = 60 * 60 * 1000
> >
> > Dim authFactory As New GAuthSubRequestFactory(YouTubeService.YTService,
> "BEE
> > MD")
> >
> > authFactory.KeepAlive = True
> >
> > authFactory.Timeout = 60 * 60 * 1000
> >
> > Dim service As New YouTubeService(authFactory.ApplicationName,
> > "BeeFFApplication", developerkey)
> >
> > service.RequestFactory = authFactory
> >
> >
> >
>  > On Thu, Oct 22, 2009 at 1:08 PM, Jeffrey Posnick <[EMAIL PROTECTED]>
> wrote:
> >
> > > Hello Clay,
> >
> > >  As per
> >
> > >  http://code.google.com/p/google-gdata/issues/detail?id=140
> >
> > > this behavior sounds very much like it's due to .NET's local client-
> > > side timeout of 100 seconds for HTTPWebRequests. In the course of
> > > investigating some other uploads issues, I tried uploading a ~300mb
> > > file from .NET, and if I don't make any changes to the client-side
> > > timeout, I'll get that "System.Net.WebException: The request was
> > > aborted: The request was canceled." after 100 seconds--which usually
> > > corresponding to between 80mb and 120mb of data transferred, depending
> > > on the network conditions.
> >
> > >  Changing the client side timeout to something larger than 100 seconds
> > > definitely resolved the issue, as Frank Mantek explains in that issue
> > > tracker entry. From C#, the following snippet takes care of setting
> > > the client-side timeout to one hour:
> >
> > >            request = new YouTubeRequest(settings);
> > >            // Set the request timeout to one hour, in milliseconds.
> > >            ((GDataRequestFactory)
> > > request.Service.RequestFactory).Timeout = 60 * 60 * 1000;
> >
> > > Cheers,
> > > -Jeff Posnick, YouTube API Team
> >
> > > On Oct 21, 2:17 pm, Clay Wright <[EMAIL PROTECTED]> wrote:
> > > > Does anyone have good documentation on direct uploading using the
> .net
> > > > library?  I can get files to upload that are small but larger files
> > > > are bombing on me and can't figure out why. The error message I
> > > > receive is request aborted request cancelled.
> >
> > > > ClayWright
> > > > [EMAIL PROTECTED]
> >
> > > > On Oct 21, 2009, at 2:09 PM, Jeffrey Posnick <[EMAIL PROTECTED]>
> wrote:
> >
> > > > > Hello Lee,
> >
> > > > > I'm glad things are working for you now.
> >
> > > > > Are you saying that leaving out
> >
> > > > >  $filesource->setContentType('video/quicktime'); #Or whatever the
> > > > > MIME type is...
> >
> > > > > is what was causing the issue for you? Because if I leave that out,
> I
> > > > > do get back a 400 Bad Request with a "No file found in upload
> > > > > request." response, not a hung connection.
> >
> > > > > Cheers,
> > > > > -Jeff Posnick, YouTube API Team
> >
> > > > > On Oct 21, 1:15 pm, Lee <[EMAIL PROTECTED]> wrote:
> > > > >> When trying to create a test case, we discovered that our Content
> > > > >> Type
> > > > >> setting was an empty string.  Once we made sure that value was
> filled
> > > > >> the uploads worked again.  This is still a bit troubling to me in
> > > > >> that
> > > > >> we don't get an error message telling us what is wrong.  The only
> way
> > > > >> we know it isn't working is because the connection to YouTube just
> > > > >> dies.  I assume this does have to do with the migration as the new
> > > > >> servers are being more picky about the content-type setting.
>  Would
> > > > >> it
> > > > >> be possible to actually detect this error and send back an
> > > > >> appropriate
> > > > >> response rather than just letting the connection die?
> >
> > > > >> Lee
> >
> > > > >> On Oct 20, 4:02 pm, Jeffrey Posnick <[EMAIL PROTECTED]> wrote:
> >
> > > > >>> Hello Lee,
> >
> > > > >>>  I'm not able to reproduce what you're describing with version
> 1.9.4
> > > > >>> of the PHP client library. Using the basic example code at
> >
> > >http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Dir
> > > > >>> ...
> >
> > > > >>> I'm able to successfully upload using the direct method.
> >
> > > > >>>  I do see one upload request from your client id that failed with
> a
> > > > >>> HTTP 400 status response on 10/16, but nothing from yesterday or
> > > > >>> today. The request being prematurely terminated prematurely might
> > > > >>> explain the absence of log entries.
> >
> > > > >>>  Is the code you're using to upload significantly different from
> the
> > > > >>> sample code linked to above? Have you tried running your code
> from
> > > > >>> an
> > > > >>> alternate machine and see if the behavior persists?
> >
> > > > >>> Cheers,
> > > > >>> -Jeff Posnick, YouTube API Team
> >
> > > > >>> On Oct 20, 11:00 am, George <[EMAIL PROTECTED]> wrote:
> >
> > > > >>>> Just to confirm what Hugo said above. An unset 'content type'
> field
> > > > >>>> previously caused no problems, but now causes the upload to
> fail.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"YouTube APIs Developer Forum" 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/youtube-api-gdata?hl=en
-~----------~----~----~----~------~----~------~--~---