Hi guys,
I'm trying to upload a file to Google drive -- It's a 400MB file.
Google::Apis::TransmissionError: execution expired
from /Users/jponc/.rbenv/versions/2.1.6/lib/ruby/2.1.0/openssl/buffering.rb:326:in `syswrite'
I'm encountering this error and I got stuck from there. I tried a couple of things like changing uploadType to reusable, but no luck
metadata = GoogleDrive::File.new(title: attachment.file_name, mime_type: attachment.file_type, parents: [folder_file])
drive.insert_file(metadata, upload_source: local_file_location.to_s, content_type: attachment.file_type)
Here's a gist of my insert_file related code

This is basically the screencap of the error I encountered.
GoogleDrive::DriveService.new.tap do |client|
client.request_options.timeout_sec = 1200
client.request_options.open_timeout_sec = 1200
client.request_options.retries = 3
end
Kudos to my friend https://github.com/sylv3rblade
Still a problem. says 'syswrite': execution expired (Google::Apis::TransmissionError) as an error and NoMethodError: undefined methodopen_timeout' for #
@webzorg Not the easiest to read, but try https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/ClientOptions#open_timeout_sec-instance_method
I ended up using:
service.client_options.send_timeout_sec = 1200
service.client_options.open_timeout_sec = 1200
Where, service = Google::Apis::SheetsV4::SheetsService.new
Most helpful comment
@webzorg Not the easiest to read, but try https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/ClientOptions#open_timeout_sec-instance_method
I ended up using:
Where,
service = Google::Apis::SheetsV4::SheetsService.new