Yes. I tried to send the email to ~40 recipients. Also, I just noticed
that each time I click the "send emails" button, 1 or 2 emails get
sent out, then the exception gets thrown. The attachments are large
jpg images (like 2550x3000 or something) so each individual image size
is something like 700kb.

The stack trace for the exception is:
javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean
com.webapps.rhinestone.client.RhinestoneAdd.emailAssociatedImages()'
threw an unexpected exception: com.google.apphosting.api.ApiProxy
$RequestTooLargeException: The request to API call mail.Send() was too
large.
        at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
        at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
188)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
224)
        at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
        at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
        at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
        at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
        at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
        at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
261)
        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:8486)
        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:8484)
        at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
        at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
418)
        at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
572)
        at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:448)
        at com.google.tracing.TraceContext.runInContext(TraceContext.java:
688)
        at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
326)
        at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
318)
        at com.google.tracing.TraceContext
$TraceContextRunnable.run(TraceContext.java:446)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: com.google.apphosting.api.ApiProxy
$RequestTooLargeException: The request to API call mail.Send() was too
large.
        at com.google.net.rpc.RpcStub$RpcCallbackDispatcher
$1.runInContext(RpcStub.java:1025)
        at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:448)
        at com.google.tracing.TraceContext.runInContext(TraceContext.java:
688)
        at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
326)
        at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
318)
        at com.google.tracing.TraceContext
$TraceContextRunnable.run(TraceContext.java:446)
        at com.google.net.rpc.RpcStub
$RpcCallbackDispatcher.rpcFinished(RpcStub.java:1046)
        at com.google.net.rpc.RPC.internalFinish(RPC.java:2104)
        at com.google.net.rpc.impl.RpcNetChannel.finishRpc(RpcNetChannel.java:
2364)
        at
com.google.net.rpc.impl.RpcNetChannel.messageReceived(RpcNetChannel.java:
1285)
        at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
        at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
        at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
        at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
        at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
        at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
        at com.google.net.async.GlobalEventRegistry
$2.runLoop(GlobalEventRegistry.java:95)
        at com.google.net.async.LoopingEventDispatcher
$EventDispatcherThread.run(LoopingEventDispatcher.java:385)


the part of the method "emailAssociatedImages" that deals with
attachmentslooks like:
for(int k=0; k<result.get(i).getAssociatedImage().size(); k++){
                                if(title!=null){

                                                //Opening up query field to 
rhinestone image class.
                                                //get the image blob based on 
the title
                                                Query getTitle = 
pm.newQuery(RhinestoneImage.class);
                                                //set the filter to search 
based on the title
                                                
getTitle.setFilter("id==titleParam");
                                                //use title from above to 
search for it
                                                
getTitle.declareParameters("String titleParam");
                                                //get the search results
                                                List<RhinestoneImage> theImage 
= (List<RhinestoneImage>)
getTitle.execute(Long.valueOf(title));
                                                if(theImage.size()==1){
                                                        //make the image of 
their recently submitted work
                                                        MailService.Attachment 
attachImage = new
MailService.Attachment("results.jpg", theImage.get(0).getImage());
                                                        //attach that to the 
main message
                                                        
attachments.add(attachImage);
                                                        //delete the image from 
the database
                                                        
pm.deletePersistent(theImage.get(0));
                                                }
                                                else{
                                                        pm.close();
                                                        LOG.warning("Error at 
line 850. Title = "+title);
                                                        LOG.warning("Size of 
Image: "+theImage.size());
                                                        return false;
                                                }
                                        }
                                        else{
                                                pm.close();
                                                LOG.warning("Error at line 
856");
                                                return false;
                                        }
                                }
                                LOG.warning("Student name: 
"+result.get(i).getStudentName());
                                //set the attachments
                                msg.setAttachments(attachments);
                                //send message
                                mailSession.send(msg);
                                //set the associated image object to null for 
this roster object
                                result.get(i).setAssociatedImages(null);
                        }

On Nov 8, 11:52 am, "Ikai Lan (Google)" <[email protected]>
wrote:
> There's a 1mb limit on RPC calls in general. Did you try to send the email
> to a large number of recipients?
>
> What we need is a reproducible test case. If you have some code and some
> attachments we can use to deterministically reproduce the error, we can
> track this down.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
> On Mon, Nov 8, 2010 at 11:37 AM, GK <[email protected]> wrote:
> > Each attachment is individually uploaded to the application and stored
> > in the datastore, so I assume that they are all less than 1mb.
> > However, it possible that an email can contain multiple attachments,
> > with the sum totaling more than 1 mb. I don't think this is the
> > problem, though, because I have successfully sent out emails that have
> > more than 1mb worth of attachments.
>
> > On Nov 8, 11:10 am, "Ikai Lan (Google)" 
> > <[email protected]<ikai.l%[email protected]>
>
> > wrote:
> > > Are the attachments greater than 1mb? Can you log the size of the
> > > attachments?
>
> > > --
> > > Ikai Lan
> > > Developer Programs Engineer, Google App Engine
> > > Blogger:http://googleappengine.blogspot.com
> > > Reddit:http://www.reddit.com/r/appengine
> > > Twitter:http://twitter.com/app_engine
>
> > > On Mon, Nov 8, 2010 at 7:13 AM, GK <[email protected]> wrote:
> > > > Hi,
>
> > > > My app threw an exception because apparently The request to API call
> > > > mail.Send() was too large. Could someone please explain what quota it
> > > > exceeded and if there is a way to get around this (either by better
> > > > coding or by paying google)
>
> > > > My app needs to send emails with image attachments. The size of these
> > > > attachments is up to the users.
>
> > > > Thanks
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google App Engine" group.
> > > > To post to this group, send email to [email protected]
> > .
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<google-appengine%[email protected]>
> > <google-appengine%[email protected]<google-appengine%[email protected]>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.

On Nov 8, 11:52 am, "Ikai Lan (Google)" <[email protected]>
wrote:
> There's a 1mb limit on RPC calls in general. Did you try to send the email
> to a large number of recipients?
>
> What we need is a reproducible test case. If you have some code and some
> attachments we can use to deterministically reproduce the error, we can
> track this down.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
> On Mon, Nov 8, 2010 at 11:37 AM, GK <[email protected]> wrote:
> > Each attachment is individually uploaded to the application and stored
> > in the datastore, so I assume that they are all less than 1mb.
> > However, it possible that an email can contain multiple attachments,
> > with the sum totaling more than 1 mb. I don't think this is the
> > problem, though, because I have successfully sent out emails that have
> > more than 1mb worth of attachments.
>
> > On Nov 8, 11:10 am, "Ikai Lan (Google)" 
> > <[email protected]<ikai.l%[email protected]>
>
> > wrote:
> > > Are the attachments greater than 1mb? Can you log the size of the
> > > attachments?
>
> > > --
> > > Ikai Lan
> > > Developer Programs Engineer, Google App Engine
> > > Blogger:http://googleappengine.blogspot.com
> > > Reddit:http://www.reddit.com/r/appengine
> > > Twitter:http://twitter.com/app_engine
>
> > > On Mon, Nov 8, 2010 at 7:13 AM, GK <[email protected]> wrote:
> > > > Hi,
>
> > > > My app threw an exception because apparently The request to API call
> > > > mail.Send() was too large. Could someone please explain what quota it
> > > > exceeded and if there is a way to get around this (either by better
> > > > coding or by paying google)
>
> > > > My app needs to send emails with image attachments. The size of these
> > > > attachments is up to the users.
>
> > > > Thanks
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google App Engine" group.
> > > > To post to this group, send email to [email protected]
> > .
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<google-appengine%[email protected]>
> > <google-appengine%[email protected]<google-appengine%[email protected]>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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-appengine?hl=en.

Reply via email to