Is Akka Persistence production ready.

232 views
Skip to first unread message

vishal singh bhadouriya

unread,
Jun 28, 2016, 6:08:24 AM6/28/16
to Akka User List
Hi Guys,

I am using Akka Persistence in a business process where n number of entities are processing and each one in a different state at any moment, if system crashed then i am recovering using persistence. But sometimes i while restarting i am getting UNABLE TO ACQUIRE LOCK ON LEVELDB, to resolve it i have delete Journal folder then only it works. How to resolve it, is there any way to get out of it.

Here are the versions i am using

<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.4.1</version>
</dependency>

 <dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-persistence-experimental_2.11</artifactId>
<version>2.3.14</version>
</dependency>

Please let me know, is it fixed in later build of Akka and is Persistence is Production ready or not.

Tal Pressman

unread,
Jun 28, 2016, 6:33:43 AM6/28/16
to Akka User List
Hi,

As far as I know, the LevelDB plugin is not intended for production, but only for development. For a reliable solution you should use a different backend (Cassandra, for example).

Tal

Viktor Klang

unread,
Jun 28, 2016, 6:41:19 AM6/28/16
to Akka User List
You're going to want to use the same Akka version for your Akka dependencies (I see that you're using 2.4.1 for akka-actor but 2.3.14 for persistence).

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Cheers,

Vishal Singh

unread,
Jun 28, 2016, 7:03:52 AM6/28/16
to Akka User List
Thanks for your valuable time

I am finalising the persistence will work in production or not, if yes then we can move to the latest version of akka no issue. Do you have any idea why this " UNABLE TO ACQUIRE LOCK ON LEVELDB" problem is coming just because of version mismatch or some other reason might be?

Vishal Singh

unread,
Jun 28, 2016, 7:08:27 AM6/28/16
to Akka User List
Thanks Tal,

Do you about " UNABLE TO ACQUIRE LOCK ON LEVELDB" this problem why it may come.We have only one JVM and One Actor system with different persistence Actors having their own unique persistence id.

Viktor Klang

unread,
Jun 28, 2016, 7:14:06 AM6/28/16
to Akka User List
LevelDB is not for production usage FWIW. Are you using the shared or embedded one?

Guido Medina

unread,
Jun 28, 2016, 7:30:00 AM6/28/16
to Akka User List
So you expect it work on a experimental version and then you will move to the version could actually work?
I don't understand that logic, you should set your versions to:

<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-actor_2.11</artifactId>
    <version>2.4.7</version>
</dependency>
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-persistence_2.11</artifactId>
    <version>2.4.7</version>
</dependency>

And I would also check that the versions of other akka related dependencies are aligned.

Guido.

Vishal Singh

unread,
Jun 28, 2016, 8:26:34 AM6/28/16
to Akka User List
No , not like that when i started using persistence the mentioned version was the latest one and i started using it, and then i faced "UNABLE TO ACQUIRE LOCK ON LEVELDB" very few time, i want to know that this issue is because of the older version and wont come in 2.4.7 version then i will update the version to 2.4.7.

Thanks for your support. 

Vishal Singh

unread,
Jun 28, 2016, 8:27:54 AM6/28/16
to Akka User List
No not shared.

Viktor Klang

unread,
Jun 28, 2016, 8:30:05 AM6/28/16
to Akka User List
Are you running multiple instances of Akka Persistence on the same machine?

vishal singh bhadouriya

unread,
Jun 28, 2016, 9:06:03 AM6/28/16
to akka...@googlegroups.com

Multiple persistent actors I am using but each actor have only one instance  and each actor is associated with unique persistent id.

Mark Hatton

unread,
Jun 29, 2016, 4:45:37 AM6/29/16
to Akka User List
Regarding "UNABLE TO ACQUIRE LOCK ON LEVELDB", when LevelDB initializes it uses a file named "LOCK" in your journal directory as a mutex to ensure only one DB instance is running per journal.  If your system hard "crashed" (like a JVM crash) then the running LevelDB instance would have no opportunity to remove its lock file on shutdown and subsequent invocations will be unable to acquire the filesystem mutex.

You may want to consider removing the lock file after hard crash, rather than deleting your journal completely.

HTH,

Mark

vishal singh bhadouriya

unread,
Jun 29, 2016, 4:47:21 AM6/29/16
to akka...@googlegroups.com

Thanks allot, it means a lot for me

Reply all
Reply to author
Forward
0 new messages