Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
mail-plugin hangs (freezes) my app
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
MG  
View profile  
 More options Apr 6 2012, 4:05 pm
From: MG <mohammed.gul...@gmail.com>
Date: Fri, 6 Apr 2012 13:05:39 -0700 (PDT)
Local: Fri, Apr 6 2012 4:05 pm
Subject: [2.0] mail-plugin hangs (freezes) my app

Hi - I was wondering if anyone is able to use the mail-plugin in a
production environment successfully?

I have included it in my app, but unable to get it working. For some
reason, the plugin hangs when I call MailPlugin.send(m). My app never gets
the control back so the entire app freezes at that point.

I looked at the mail-plugin source, but couldn't figure out the issue. Here
are the source code for the send method:

   private def sendMessage(msg:Email)(implicit  app:Application):Promise[Boolean] = {
      import akka.util.Timeout
      implicit val timeout = Timeout(Duration(5, "seconds"))
      (MailWorker.ref ? (msg)).mapTo[Boolean].asPromise   //FIX-ME, switch to fire and forget
   }

There is a comment that says FIX-ME, but I have no clue how to fix it.

I would appreciate if you could tell me what may be the problem and how do I fix it?

It would also helpful to know if anyone is able to use the mail-plugin successfully in a production environment by just following the direction in the readme file.

Thanks,
MG


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MG  
View profile  
 More options Apr 6 2012, 9:03 pm
From: MG <mohammed.gul...@gmail.com>
Date: Fri, 6 Apr 2012 18:03:43 -0700 (PDT)
Local: Fri, Apr 6 2012 9:03 pm
Subject: Re: [2.0] mail-plugin hangs (freezes) my app

I found out what was the problem; I made a rookie mistake. Looking at
source code again, I realize that it is returning Promise, which I was
ignoring in my code. I am still having some other problem, but at least now
I know why the browser was becoming non-responsive.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MG  
View profile  
 More options Apr 6 2012, 10:05 pm
From: MG <mohammed.gul...@gmail.com>
Date: Fri, 6 Apr 2012 19:05:41 -0700 (PDT)
Local: Fri, Apr 6 2012 10:05 pm
Subject: Re: [2.0] mail-plugin hangs (freezes) my app

I am stuck again with the following exception. It is thrown five seconds
after I call MailPlugin.send

2012-04-06 18:58:01,049 - [ERROR] - from play in
application-akka.actor.default-dispatcher-3
Waiting for a promise, but got an error: null
akka.pattern.AskTimeoutException: null
    at akka.dispatch.DefaultPromise.result(Future.scala:839)
[akka-actor.jar:2.0]
    at akka.dispatch.Await$.result(Future.scala:74) ~[akka-actor.jar:2.0]
    at play.api.libs.concurrent.AkkaPromise.await(Akka.scala:43)
~[play_2.9.1.jar:2.0]
    at play.api.libs.concurrent.Promise$class.await(Promise.scala:44)
~[play_2.9.1.jar:2.0]
    at play.api.libs.concurrent.AkkaPromise.await(Akka.scala:28)
~[play_2.9.1.jar:2.0]
    at play.api.libs.concurrent.Promise$class.value(Promise.scala:42)
~[play_2.9.1.jar:2.0]
    at play.api.libs.concurrent.AkkaPromise.value(Akka.scala:28)
~[play_2.9.1.jar:2.0]
    at
play.api.libs.concurrent.Promise$$anonfun$extend1$1.apply(Promise.scala:40)
[play_2.9.1.jar:2.0]
    at
play.api.libs.concurrent.Promise$$anonfun$extend1$1.apply(Promise.scala:40)
[play_2.9.1.jar:2.0]
    at
play.api.libs.concurrent.AkkaPromise$$anonfun$extend$2$$anonfun$apply$3.app ly(Akka.scala:37)
[play_2.9.1.jar:2.0]
    at
scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala: 110)
[scala-library.jar:na]
    at
scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala: 110)
[scala-library.jar:na]
    at scala.util.control.Exception$Catch.apply(Exception.scala:88)
[scala-library.jar:na]
    at scala.util.control.Exception$Catch.either(Exception.scala:110)
[scala-library.jar:na]
    at play.api.libs.concurrent.STMPromise.redeem(Promise.scala:166)
[play_2.9.1.jar:2.0]
    at
play.api.libs.concurrent.AkkaPromise$$anonfun$extend$2.apply(Akka.scala:37)
[play_2.9.1.jar:2.0]
    at
play.api.libs.concurrent.AkkaPromise$$anonfun$extend$2.apply(Akka.scala:37)
[play_2.9.1.jar:2.0]
    at akka.dispatch.Future$$anonfun$onFailure$1.apply(Future.scala:480)
[akka-actor.jar:2.0]
    at akka.dispatch.Future$$anonfun$onFailure$1.apply(Future.scala:479)
[akka-actor.jar:2.0]
    at
akka.dispatch.DefaultPromise.akka$dispatch$DefaultPromise$$notifyCompleted( Future.scala:907)
[akka-actor.jar:2.0]
    at
akka.dispatch.DefaultPromise$$anonfun$tryComplete$1$$anonfun$apply$mcV$sp$4 .apply(Future.scala:884)
[akka-actor.jar:2.0]
    at
akka.dispatch.DefaultPromise$$anonfun$tryComplete$1$$anonfun$apply$mcV$sp$4 .apply(Future.scala:884)
[akka-actor.jar:2.0]
    at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala: 59)
[scala-library.jar:0.11.2]
    at scala.collection.immutable.List.foreach(List.scala:45)
[scala-library.jar:0.11.2]
    at
akka.dispatch.DefaultPromise$$anonfun$tryComplete$1.apply$mcV$sp(Future.sca la:884)
[akka-actor.jar:2.0]
    at
akka.dispatch.Future$$anon$4$$anonfun$run$1.apply$mcV$sp(Future.scala:386)
[akka-actor.jar:2.0]
    at akka.dispatch.Future$$anon$4$$anonfun$run$1.apply(Future.scala:378)
[akka-actor.jar:2.0]
    at akka.dispatch.Future$$anon$4$$anonfun$run$1.apply(Future.scala:378)
[akka-actor.jar:2.0]
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
[scala-library.jar:na]
    at akka.dispatch.Future$$anon$4.run(Future.scala:378)
[akka-actor.jar:2.0]
    at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:83)
[akka-actor.jar:2.0]
    at
akka.jsr166y.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1381 )
[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:997)
[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1495)
[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
[akka-actor.jar:2.0]

2012-04-06 18:58:16,322 - [ERROR] - from application in
application-akka.actor.default-dispatcher-5
MailPlugin error:Generic error: Exception reading response

Any idea what could be causing this exception?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MG  
View profile  
 More options Apr 9 2012, 11:21 am
From: MG <mohammed.gul...@gmail.com>
Date: Mon, 9 Apr 2012 08:21:07 -0700 (PDT)
Local: Mon, Apr 9 2012 11:21 am
Subject: Re: [2.0] mail-plugin hangs (freezes) my app

Problem solved by switching to a different SMTP server. At some point I
need to figure out why the MailPlugin would not work with AT&T's SMTP
server, but for now I can continue with my app.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »