Jar works with console, throws exceptions when launched via start?

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

I'm trying to get my app packaged in jar to work with the Java Wrapper, and have set up all correctly.When I launch the service in console mode, all works correctly.

When I do the same with service mode - the service shuts down after a few seconds, and has the following errors in the log:

INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException: java.lang.ThreadDeath
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at java.sql.DriverManager.getConnection(DriverManager.java:582)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at java.sql.DriverManager.getConnection(DriverManager.java:185)

(Below it my own functions exceptions - but this is a standard JDBC connector for MySQL).

And this comes next (where I have function launching external process via exec function):

INFO   | jvm 1    | 2008/09/13 00:05:03 | java.lang.InterruptedException
INFO   | jvm 1    | 2008/09/13 00:05:03 |       at java.lang.Object.wait(Native Method)
INFO   | jvm 1    | 2008/09/13 00:05:03 |       at java.lang.Object.wait(Object.java:485)
INFO   | jvm 1    | 2008/09/13 00:05:03 |       at java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)


Any idea what different between the console and start modes, and why the basic functionality doesn't work in this mode?

Regards.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Fwd: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

Can anyone advice on this issue?

I need to resolve it ASAP.

Regards.

---------- Forwarded message ----------
From: Stas Oskin <stas.oskin@...>
Date: 2008/9/13
Subject: Jar works with console, throws exceptions when launched via start?
To: ‏wrapper-user@...


Hi.

I'm trying to get my app packaged in jar to work with the Java Wrapper, and have set up all correctly.When I launch the service in console mode, all works correctly.

When I do the same with service mode - the service shuts down after a few seconds, and has the following errors in the log:

INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException: java.lang.ThreadDeath
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at java.sql.DriverManager.getConnection(DriverManager.java:582)
INFO   | jvm 1    | 2008/09/13 00:05:01 |       at java.sql.DriverManager.getConnection(DriverManager.java:185)

(Below it my own functions exceptions - but this is a standard JDBC connector for MySQL).

And this comes next (where I have function launching external process via exec function):

INFO   | jvm 1    | 2008/09/13 00:05:03 | java.lang.InterruptedException
INFO   | jvm 1    | 2008/09/13 00:05:03 |       at java.lang.Object.wait(Native Method)
INFO   | jvm 1    | 2008/09/13 00:05:03 |       at java.lang.Object.wait(Object.java:485)
INFO   | jvm 1    | 2008/09/13 00:05:03 |       at java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)


Any idea what different between the console and start modes, and why the basic functionality doesn't work in this mode?

Regards.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
What platform and version are you running on?  I see a reference to a
UNIXProcess so I assume it is not Windows.

On UNIX versions, there is really no difference in the way the Wrapper
launches the JVM between running in Console or Started as a daemon
process.  There could be differences in the environment variables
available to the Wrapper when it launches however.  For example, the
PATH, or LD_LIBRARY_PATH.   There could also be file permission issues
if they are not being run as the same user.

Either way however, the Wrapper and JVM appear to be working.   Most
likely something in the application is failing for one of the above
reasons which is leading to it being in an unstable state, thus
causing the exceptions.

As these appear to be JDBC driver related, I would guess that maybe a
native component of your driver is failing to load.  Does MySQL have a
native driver?  I have used the pure Java driver.   I tried Googling
and found your question but not much else.

I would be happy to help out with more information.

Cheers,
Leif

On Sat, Sep 13, 2008 at 7:11 PM, Stas Oskin <stas.oskin@...> wrote:

> Hi.
>
> I'm trying to get my app packaged in jar to work with the Java Wrapper, and
> have set up all correctly.When I launch the service in console mode, all
> works correctly.
>
> When I do the same with service mode - the service shuts down after a few
> seconds, and has the following errors in the log:
>
> INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException:
> java.lang.ThreadDeath
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> java.sql.DriverManager.getConnection(DriverManager.java:582)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> java.sql.DriverManager.getConnection(DriverManager.java:185)
>
> (Below it my own functions exceptions - but this is a standard JDBC
> connector for MySQL).
>
> And this comes next (where I have function launching external process via
> exec function):
>
> INFO   | jvm 1    | 2008/09/13 00:05:03 | java.lang.InterruptedException
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.Object.wait(Native Method)
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.Object.wait(Object.java:485)
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)
>
>
> Any idea what different between the console and start modes, and why the
> basic functionality doesn't work in this mode?
>
> Regards.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

Well, I sorted it out - it was an Enter key handler which somehow interfered and caused a chain reaction.

I noticed a very serious issue in the wrapper - sometimes it exits/crashes together with the Java app, and hence can't restart it.

Any idea what's going on, and how the wrapper can be reliably used?

Regards.

2008/9/16 Leif Mortenson <leif@...>
Stas,
What platform and version are you running on?  I see a reference to a
UNIXProcess so I assume it is not Windows.

On UNIX versions, there is really no difference in the way the Wrapper
launches the JVM between running in Console or Started as a daemon
process.  There could be differences in the environment variables
available to the Wrapper when it launches however.  For example, the
PATH, or LD_LIBRARY_PATH.   There could also be file permission issues
if they are not being run as the same user.

Either way however, the Wrapper and JVM appear to be working.   Most
likely something in the application is failing for one of the above
reasons which is leading to it being in an unstable state, thus
causing the exceptions.

As these appear to be JDBC driver related, I would guess that maybe a
native component of your driver is failing to load.  Does MySQL have a
native driver?  I have used the pure Java driver.   I tried Googling
and found your question but not much else.

I would be happy to help out with more information.

Cheers,
Leif

On Sat, Sep 13, 2008 at 7:11 PM, Stas Oskin <stas.oskin@...> wrote:
> Hi.
>
> I'm trying to get my app packaged in jar to work with the Java Wrapper, and
> have set up all correctly.When I launch the service in console mode, all
> works correctly.
>
> When I do the same with service mode - the service shuts down after a few
> seconds, and has the following errors in the log:
>
> INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException:
> java.lang.ThreadDeath
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> java.sql.DriverManager.getConnection(DriverManager.java:582)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> java.sql.DriverManager.getConnection(DriverManager.java:185)
>
> (Below it my own functions exceptions - but this is a standard JDBC
> connector for MySQL).
>
> And this comes next (where I have function launching external process via
> exec function):
>
> INFO   | jvm 1    | 2008/09/13 00:05:03 | java.lang.InterruptedException
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.Object.wait(Native Method)
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.Object.wait(Object.java:485)
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)
>
>
> Any idea what different between the console and start modes, and why the
> basic functionality doesn't work in this mode?
>
> Regards.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

Additionally, I found something much more worrisome.

When my app runs under the wrapper, it takes MUCH more resources then when it runs in console. It basically makes my system unresponsive.

Any idea why is that?

Regards.

2008/9/16 Stas Oskin <stas.oskin@...>
Hi.

Well, I sorted it out - it was an Enter key handler which somehow interfered and caused a chain reaction.

I noticed a very serious issue in the wrapper - sometimes it exits/crashes together with the Java app, and hence can't restart it.

Any idea what's going on, and how the wrapper can be reliably used?

Regards.

2008/9/16 Leif Mortenson <leif@...>

Stas,
What platform and version are you running on?  I see a reference to a
UNIXProcess so I assume it is not Windows.

On UNIX versions, there is really no difference in the way the Wrapper
launches the JVM between running in Console or Started as a daemon
process.  There could be differences in the environment variables
available to the Wrapper when it launches however.  For example, the
PATH, or LD_LIBRARY_PATH.   There could also be file permission issues
if they are not being run as the same user.

Either way however, the Wrapper and JVM appear to be working.   Most
likely something in the application is failing for one of the above
reasons which is leading to it being in an unstable state, thus
causing the exceptions.

As these appear to be JDBC driver related, I would guess that maybe a
native component of your driver is failing to load.  Does MySQL have a
native driver?  I have used the pure Java driver.   I tried Googling
and found your question but not much else.

I would be happy to help out with more information.

Cheers,
Leif

On Sat, Sep 13, 2008 at 7:11 PM, Stas Oskin <stas.oskin@...> wrote:
> Hi.
>
> I'm trying to get my app packaged in jar to work with the Java Wrapper, and
> have set up all correctly.When I launch the service in console mode, all
> works correctly.
>
> When I do the same with service mode - the service shuts down after a few
> seconds, and has the following errors in the log:
>
> INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException:
> java.lang.ThreadDeath
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> java.sql.DriverManager.getConnection(DriverManager.java:582)
> INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
> java.sql.DriverManager.getConnection(DriverManager.java:185)
>
> (Below it my own functions exceptions - but this is a standard JDBC
> connector for MySQL).
>
> And this comes next (where I have function launching external process via
> exec function):
>
> INFO   | jvm 1    | 2008/09/13 00:05:03 | java.lang.InterruptedException
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.Object.wait(Native Method)
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.Object.wait(Object.java:485)
> INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
> java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)
>
>
> Any idea what different between the console and start modes, and why the
> basic functionality doesn't work in this mode?
>
> Regards.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
See my replies in line.

On Tue, Sep 16, 2008 at 10:29 PM, Stas Oskin <stas.oskin@...> wrote:
> Well, I sorted it out - it was an Enter key handler which somehow interfered
> and caused a chain reaction.

The Wrapper should be able to handle input streams from within Java.
Could you describe a little more what you are doing?  Maybe with a
code fragment?  I would like to try it out.

> I noticed a very serious issue in the wrapper - sometimes it exits/crashes
> together with the Java app, and hence can't restart it.

That would not be good.  What version of the Wrapper are you using and
what platform are you running on?  There are no crashes that I am
aware of in the newest version, but some older versions have had a
couple issues which could lead to this.

If you are able to reproduce this, could you please set the following
properties and then send me the resulting wrapper.log file up through
the crash.  It will be quite large, so please send it to me directly
rather than on list.
---
wrapper.debug=true
wrapper.state_output=true
---
That should show me exactly where the crash is happening.

> Any idea what's going on, and how the wrapper can be reliably used?

We'll get this figured out for you.

Cheers,
Leif

> 2008/9/16 Leif Mortenson <leif@...>
>>
>> Stas,
>> What platform and version are you running on?  I see a reference to a
>> UNIXProcess so I assume it is not Windows.
>>
>> On UNIX versions, there is really no difference in the way the Wrapper
>> launches the JVM between running in Console or Started as a daemon
>> process.  There could be differences in the environment variables
>> available to the Wrapper when it launches however.  For example, the
>> PATH, or LD_LIBRARY_PATH.   There could also be file permission issues
>> if they are not being run as the same user.
>>
>> Either way however, the Wrapper and JVM appear to be working.   Most
>> likely something in the application is failing for one of the above
>> reasons which is leading to it being in an unstable state, thus
>> causing the exceptions.
>>
>> As these appear to be JDBC driver related, I would guess that maybe a
>> native component of your driver is failing to load.  Does MySQL have a
>> native driver?  I have used the pure Java driver.   I tried Googling
>> and found your question but not much else.
>>
>> I would be happy to help out with more information.
>>
>> Cheers,
>> Leif
>>
>> On Sat, Sep 13, 2008 at 7:11 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi.
>> >
>> > I'm trying to get my app packaged in jar to work with the Java Wrapper,
>> > and
>> > have set up all correctly.When I launch the service in console mode, all
>> > works correctly.
>> >
>> > When I do the same with service mode - the service shuts down after a
>> > few
>> > seconds, and has the following errors in the log:
>> >
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException:
>> > java.lang.ThreadDeath
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> >
>> > com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > java.sql.DriverManager.getConnection(DriverManager.java:582)
>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>> > java.sql.DriverManager.getConnection(DriverManager.java:185)
>> >
>> > (Below it my own functions exceptions - but this is a standard JDBC
>> > connector for MySQL).
>> >
>> > And this comes next (where I have function launching external process
>> > via
>> > exec function):
>> >
>> > INFO   | jvm 1    | 2008/09/13 00:05:03 | java.lang.InterruptedException
>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
>> > java.lang.Object.wait(Native Method)
>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
>> > java.lang.Object.wait(Object.java:485)
>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
>> > java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)
>> >
>> >
>> > Any idea what different between the console and start modes, and why the
>> > basic functionality doesn't work in this mode?
>> >
>> > Regards.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
This is also not something that we normally see.   Which process is
consuming the CPU?  Is it your Java process?

A couple years ago another user had a similar problem.  It turned out
to be caused by a path problem where a configuration file was failing
to be opened.  That was throwing an exception which was being caught
and ignored.  Then the whole thing was in a loop without any delays.
The result was that the program thrashed consuming 100% CPU.

The log information requested in reply to your other email may help
show the cause of this problem as well.

Cheers,
Leif

On Wed, Sep 17, 2008 at 12:13 AM, Stas Oskin <stas.oskin@...> wrote:

> Hi.
>
> Additionally, I found something much more worrisome.
>
> When my app runs under the wrapper, it takes MUCH more resources then when
> it runs in console. It basically makes my system unresponsive.
>
> Any idea why is that?
>
> Regards.
>
> 2008/9/16 Stas Oskin <stas.oskin@...>
>>
>> Hi.
>>
>> Well, I sorted it out - it was an Enter key handler which somehow
>> interfered and caused a chain reaction.
>>
>> I noticed a very serious issue in the wrapper - sometimes it exits/crashes
>> together with the Java app, and hence can't restart it.
>>
>> Any idea what's going on, and how the wrapper can be reliably used?
>>
>> Regards.
>>
>> 2008/9/16 Leif Mortenson <leif@...>
>>>
>>> Stas,
>>> What platform and version are you running on?  I see a reference to a
>>> UNIXProcess so I assume it is not Windows.
>>>
>>> On UNIX versions, there is really no difference in the way the Wrapper
>>> launches the JVM between running in Console or Started as a daemon
>>> process.  There could be differences in the environment variables
>>> available to the Wrapper when it launches however.  For example, the
>>> PATH, or LD_LIBRARY_PATH.   There could also be file permission issues
>>> if they are not being run as the same user.
>>>
>>> Either way however, the Wrapper and JVM appear to be working.   Most
>>> likely something in the application is failing for one of the above
>>> reasons which is leading to it being in an unstable state, thus
>>> causing the exceptions.
>>>
>>> As these appear to be JDBC driver related, I would guess that maybe a
>>> native component of your driver is failing to load.  Does MySQL have a
>>> native driver?  I have used the pure Java driver.   I tried Googling
>>> and found your question but not much else.
>>>
>>> I would be happy to help out with more information.
>>>
>>> Cheers,
>>> Leif
>>>
>>> On Sat, Sep 13, 2008 at 7:11 PM, Stas Oskin <stas.oskin@...> wrote:
>>> > Hi.
>>> >
>>> > I'm trying to get my app packaged in jar to work with the Java Wrapper,
>>> > and
>>> > have set up all correctly.When I launch the service in console mode,
>>> > all
>>> > works correctly.
>>> >
>>> > When I do the same with service mode - the service shuts down after a
>>> > few
>>> > seconds, and has the following errors in the log:
>>> >
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 | java.sql.SQLException:
>>> > java.lang.ThreadDeath
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> >
>>> > com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > java.sql.DriverManager.getConnection(DriverManager.java:582)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:01 |       at
>>> > java.sql.DriverManager.getConnection(DriverManager.java:185)
>>> >
>>> > (Below it my own functions exceptions - but this is a standard JDBC
>>> > connector for MySQL).
>>> >
>>> > And this comes next (where I have function launching external process
>>> > via
>>> > exec function):
>>> >
>>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |
>>> > java.lang.InterruptedException
>>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
>>> > java.lang.Object.wait(Native Method)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
>>> > java.lang.Object.wait(Object.java:485)
>>> > INFO   | jvm 1    | 2008/09/13 00:05:03 |       at
>>> > java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)
>>> >
>>> >
>>> > Any idea what different between the console and start modes, and why
>>> > the
>>> > basic functionality doesn't work in this mode?
>>> >
>>> > Regards.
>>> >
>>> >
>>> > -------------------------------------------------------------------------
>>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> > challenge
>>> > Build the coolest Linux based applications with Moblin SDK & win great
>>> > prizes
>>> > Grand prize is a trip for two to an Open Source event anywhere in the
>>> > world
>>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> > _______________________________________________
>>> > Wrapper-user mailing list
>>> > Wrapper-user@...
>>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>>> >
>>> >
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Wrapper-user mailing list
>>> Wrapper-user@...
>>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif.

Eventually we sorted it out. There were huge mem-leaks which apparently just were more visible with wrapper, as the app run as a background process.

Which brings me to my current issue - probably not purely related to wrapper, but perhaps which can be solved with it.

I noticed that my app takes about 10% less of CPU when running under wrapper, which (as it's a real time app) immediately visible on the results. I presume that it's because the background processes get less priority then the foreground.

My question is, how it's possible to give the app same priority as to the foreground processes?

Regards.


2008/9/17 Leif Mortenson <leif@...>
Stas,
This is also not something that we normally see.   Which process is
consuming the CPU?  Is it your Java process?

A couple years ago another user had a similar problem.  It turned out
to be caused by a path problem where a configuration file was failing
to be opened.  That was throwing an exception which was being caught
and ignored.  Then the whole thing was in a loop without any delays.
The result was that the program thrashed consuming 100% CPU.

The log information requested in reply to your other email may help
show the cause of this problem as well.

Cheers,
Leif



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
That's great news.   The memory leaks were in the Java code?  What are
you maximum memory settings set to?  Are they low enough that the
entire JVM will fit in memory without any swapping along side the OS
and other apps being used?  Java performs very poorly when its memory
is being swapped out. (Not a Wrapper issue)

About the CPU, I reread this thread but I don't think you ever told me
what platform you are running on.  That will make a big difference.
Under UNIX, there is a setting in the shell script which allows you to
specify a "nice" level to control the priority.
On Windows, it is done using the
wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
read the warnings in the documentation.
http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html

Normally on most platforms, the OS gives priority to the Windowing
system and those processes to make them more responsive.  That is why
on UNIX, it is good to run servers in a headless environment.

Cheers,
Leif


On Wed, Oct 1, 2008 at 4:53 AM, Stas Oskin <stas.oskin@...> wrote:

> Hi Leif.
>
> Eventually we sorted it out. There were huge mem-leaks which apparently just
> were more visible with wrapper, as the app run as a background process.
>
> Which brings me to my current issue - probably not purely related to
> wrapper, but perhaps which can be solved with it.
>
> I noticed that my app takes about 10% less of CPU when running under
> wrapper, which (as it's a real time app) immediately visible on the results.
> I presume that it's because the background processes get less priority then
> the foreground.
>
> My question is, how it's possible to give the app same priority as to the
> foreground processes?
>
> Regards.
>
>
> 2008/9/17 Leif Mortenson <leif@...>
>>
>> Stas,
>> This is also not something that we normally see.   Which process is
>> consuming the CPU?  Is it your Java process?
>>
>> A couple years ago another user had a similar problem.  It turned out
>> to be caused by a path problem where a configuration file was failing
>> to be opened.  That was throwing an exception which was being caught
>> and ignored.  Then the whole thing was in a loop without any delays.
>> The result was that the program thrashed consuming 100% CPU.
>>
>> The log information requested in reply to your other email may help
>> show the cause of this problem as well.
>>
>> Cheers,
>> Leif
>>
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif.

2008/10/1 Leif Mortenson <leif@...>
Stas,
That's great news.   The memory leaks were in the Java code?  What are
you maximum memory settings set to?  Are they low enough that the
entire JVM will fit in memory without any swapping along side the OS
and other apps being used?  Java performs very poorly when its memory
is being swapped out. (Not a Wrapper issue)

The leaks were in JNI code and quickly took the whole memory. This caused Java to swap.
 

About the CPU, I reread this thread but I don't think you ever told me
what platform you are running on.  That will make a big difference.
Under UNIX, there is a setting in the shell script which allows you to
specify a "nice" level to control the priority.

We use Linux - CentOS distro. What setting we should look to?


On Windows, it is done using the
wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
read the warnings in the documentation.
http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html

Normally on most platforms, the OS gives priority to the Windowing
system and those processes to make them more responsive.  That is why
on UNIX, it is good to run servers in a headless environment.

Hmm, we running the server without any X installed, strictly via console - is this what you call headless?

Actually, this is the main app the server was targeted to, so we indeed prefer to give it all the priority we can (without hanging the OS of course).
 
Regards.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
On linux, open your wrapper shell script in an editor and modify the
PRIORITY value found in the settings section towards the top.  These
are standard nice levels, so look at "man nice" for details.

Cheers,
Leif

On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...> wrote:

> Hi Leif.
>
> 2008/10/1 Leif Mortenson <leif@...>
>>
>> Stas,
>> That's great news.   The memory leaks were in the Java code?  What are
>> you maximum memory settings set to?  Are they low enough that the
>> entire JVM will fit in memory without any swapping along side the OS
>> and other apps being used?  Java performs very poorly when its memory
>> is being swapped out. (Not a Wrapper issue)
>
> The leaks were in JNI code and quickly took the whole memory. This caused
> Java to swap.
>
>>
>> About the CPU, I reread this thread but I don't think you ever told me
>> what platform you are running on.  That will make a big difference.
>> Under UNIX, there is a setting in the shell script which allows you to
>> specify a "nice" level to control the priority.
>
> We use Linux - CentOS distro. What setting we should look to?
>
>>
>> On Windows, it is done using the
>> wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
>> read the warnings in the documentation.
>>
>> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>>
>> Normally on most platforms, the OS gives priority to the Windowing
>> system and those processes to make them more responsive.  That is why
>> on UNIX, it is good to run servers in a headless environment.
>
> Hmm, we running the server without any X installed, strictly via console -
> is this what you call headless?
>
> Actually, this is the main app the server was targeted to, so we indeed
> prefer to give it all the priority we can (without hanging the OS of
> course).
>
> Regards.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif.

Thanks, I see.

Do you have any idea how to find current priority level (so I could increase 1 by 1).

Regards.

2008/10/1 Leif Mortenson <leif@...>
Stas,
On linux, open your wrapper shell script in an editor and modify the
PRIORITY value found in the settings section towards the top.  These
are standard nice levels, so look at "man nice" for details.

Cheers,
Leif

On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...> wrote:
> Hi Leif.
>
> 2008/10/1 Leif Mortenson <leif@...>
>>
>> Stas,
>> That's great news.   The memory leaks were in the Java code?  What are
>> you maximum memory settings set to?  Are they low enough that the
>> entire JVM will fit in memory without any swapping along side the OS
>> and other apps being used?  Java performs very poorly when its memory
>> is being swapped out. (Not a Wrapper issue)
>
> The leaks were in JNI code and quickly took the whole memory. This caused
> Java to swap.
>
>>
>> About the CPU, I reread this thread but I don't think you ever told me
>> what platform you are running on.  That will make a big difference.
>> Under UNIX, there is a setting in the shell script which allows you to
>> specify a "nice" level to control the priority.
>
> We use Linux - CentOS distro. What setting we should look to?
>
>>
>> On Windows, it is done using the
>> wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
>> read the warnings in the documentation.
>>
>> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>>
>> Normally on most platforms, the OS gives priority to the Windowing
>> system and those processes to make them more responsive.  That is why
>> on UNIX, it is good to run servers in a headless environment.
>
> Hmm, we running the server without any X installed, strictly via console -
> is this what you call headless?
>
> Actually, this is the main app the server was targeted to, so we indeed
> prefer to give it all the priority we can (without hanging the OS of
> course).
>
> Regards.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
I was able to to check the default priorities using the following command:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm

On Ubuntu, the Wrapper is defaulting to a nice level of 0 and a
real-time priority of 24, but the JVM is set to a nice level of 0 and
a real-time priority of 19.
According to the nice manual however, the range of possible values is
-20 (most favorable) to 19 (least favorable)

If I set the PRIORITY in the script to 5 then the nice levels both get
set to 5, but the real-time priorities are 19 and 15 respectively.
This is actually lower priority.
Setting priorities to a value higher than 0 requires root privilege.

If do so and set it to -5, then the nice levels are both -5, and the
real-time priorities are 29 and 26 respectively.

So quick answer, the default is 0.   I need to look into the real-time
priority more on my end.   you are probable seeing the lower priority
do to this difference in real-time priorities between the top level
wrapper process and its child java process.  I had not noticed this
before.

Cheers,
Leif

On Wed, Oct 1, 2008 at 11:30 PM, Stas Oskin <stas.oskin@...> wrote:

> Hi Leif.
>
> Thanks, I see.
>
> Do you have any idea how to find current priority level (so I could increase
> 1 by 1).
>
> Regards.
>
> 2008/10/1 Leif Mortenson <leif@...>
>>
>> Stas,
>> On linux, open your wrapper shell script in an editor and modify the
>> PRIORITY value found in the settings section towards the top.  These
>> are standard nice levels, so look at "man nice" for details.
>>
>> Cheers,
>> Leif
>>
>> On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi Leif.
>> >
>> > 2008/10/1 Leif Mortenson <leif@...>
>> >>
>> >> Stas,
>> >> That's great news.   The memory leaks were in the Java code?  What are
>> >> you maximum memory settings set to?  Are they low enough that the
>> >> entire JVM will fit in memory without any swapping along side the OS
>> >> and other apps being used?  Java performs very poorly when its memory
>> >> is being swapped out. (Not a Wrapper issue)
>> >
>> > The leaks were in JNI code and quickly took the whole memory. This
>> > caused
>> > Java to swap.
>> >
>> >>
>> >> About the CPU, I reread this thread but I don't think you ever told me
>> >> what platform you are running on.  That will make a big difference.
>> >> Under UNIX, there is a setting in the shell script which allows you to
>> >> specify a "nice" level to control the priority.
>> >
>> > We use Linux - CentOS distro. What setting we should look to?
>> >
>> >>
>> >> On Windows, it is done using the
>> >> wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
>> >> read the warnings in the documentation.
>> >>
>> >>
>> >> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>> >>
>> >> Normally on most platforms, the OS gives priority to the Windowing
>> >> system and those processes to make them more responsive.  That is why
>> >> on UNIX, it is good to run servers in a headless environment.
>> >
>> > Hmm, we running the server without any X installed, strictly via console
>> > -
>> > is this what you call headless?
>> >
>> > Actually, this is the main app the server was targeted to, so we indeed
>> > prefer to give it all the priority we can (without hanging the OS of
>> > course).
>> >
>> > Regards.
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Wrapper-user mailing list
>> > Wrapper-user@...
>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Wrapper-user mailing list
>> Wrapper-user@...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Lee.

You mean that the wrapper actually gets a higher priority then the JVM it launches?

Regards.

2008/10/5 Leif Mortenson <leif@...>
Stas,
I was able to to check the default priorities using the following command:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm

On Ubuntu, the Wrapper is defaulting to a nice level of 0 and a
real-time priority of 24, but the JVM is set to a nice level of 0 and
a real-time priority of 19.
According to the nice manual however, the range of possible values is
-20 (most favorable) to 19 (least favorable)

If I set the PRIORITY in the script to 5 then the nice levels both get
set to 5, but the real-time priorities are 19 and 15 respectively.
This is actually lower priority.
Setting priorities to a value higher than 0 requires root privilege.

If do so and set it to -5, then the nice levels are both -5, and the
real-time priorities are 29 and 26 respectively.

So quick answer, the default is 0.   I need to look into the real-time
priority more on my end.   you are probable seeing the lower priority
do to this difference in real-time priorities between the top level
wrapper process and its child java process.  I had not noticed this
before.

Cheers,
Leif

On Wed, Oct 1, 2008 at 11:30 PM, Stas Oskin <stas.oskin@...> wrote:
> Hi Leif.
>
> Thanks, I see.
>
> Do you have any idea how to find current priority level (so I could increase
> 1 by 1).
>
> Regards.
>
> 2008/10/1 Leif Mortenson <leif@...>
>>
>> Stas,
>> On linux, open your wrapper shell script in an editor and modify the
>> PRIORITY value found in the settings section towards the top.  These
>> are standard nice levels, so look at "man nice" for details.
>>
>> Cheers,
>> Leif
>>
>> On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi Leif.
>> >
>> > 2008/10/1 Leif Mortenson <leif@...>
>> >>
>> >> Stas,
>> >> That's great news.   The memory leaks were in the Java code?  What are
>> >> you maximum memory settings set to?  Are they low enough that the
>> >> entire JVM will fit in memory without any swapping along side the OS
>> >> and other apps being used?  Java performs very poorly when its memory
>> >> is being swapped out. (Not a Wrapper issue)
>> >
>> > The leaks were in JNI code and quickly took the whole memory. This
>> > caused
>> > Java to swap.
>> >
>> >>
>> >> About the CPU, I reread this thread but I don't think you ever told me
>> >> what platform you are running on.  That will make a big difference.
>> >> Under UNIX, there is a setting in the shell script which allows you to
>> >> specify a "nice" level to control the priority.
>> >
>> > We use Linux - CentOS distro. What setting we should look to?
>> >
>> >>
>> >> On Windows, it is done using the
>> >> wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
>> >> read the warnings in the documentation.
>> >>
>> >>
>> >> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>> >>
>> >> Normally on most platforms, the OS gives priority to the Windowing
>> >> system and those processes to make them more responsive.  That is why
>> >> on UNIX, it is good to run servers in a headless environment.
>> >
>> > Hmm, we running the server without any X installed, strictly via console
>> > -
>> > is this what you call headless?
>> >
>> > Actually, this is the main app the server was targeted to, so we indeed
>> > prefer to give it all the priority we can (without hanging the OS of
>> > course).
>> >
>> > Regards.
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Wrapper-user mailing list
>> > Wrapper-user@...
>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Wrapper-user mailing list
>> Wrapper-user@...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Fwd: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, Leif.

---------- Forwarded message ----------
From: Stas Oskin <stas.oskin@...>
Date: 2008/10/5
Subject: Re: [Wrapper-user] Jar works with console, throws exceptions when launched via start?
To: ‏wrapper-user@...


Hi Lee.

You mean that the wrapper actually gets a higher priority then the JVM it launches?

Regards.

2008/10/5 Leif Mortenson <leif@...>

Stas,
I was able to to check the default priorities using the following command:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm

On Ubuntu, the Wrapper is defaulting to a nice level of 0 and a
real-time priority of 24, but the JVM is set to a nice level of 0 and
a real-time priority of 19.
According to the nice manual however, the range of possible values is
-20 (most favorable) to 19 (least favorable)

If I set the PRIORITY in the script to 5 then the nice levels both get
set to 5, but the real-time priorities are 19 and 15 respectively.
This is actually lower priority.
Setting priorities to a value higher than 0 requires root privilege.

If do so and set it to -5, then the nice levels are both -5, and the
real-time priorities are 29 and 26 respectively.

So quick answer, the default is 0.   I need to look into the real-time
priority more on my end.   you are probable seeing the lower priority
do to this difference in real-time priorities between the top level
wrapper process and its child java process.  I had not noticed this
before.

Cheers,
Leif

On Wed, Oct 1, 2008 at 11:30 PM, Stas Oskin <stas.oskin@...> wrote:
> Hi Leif.
>
> Thanks, I see.
>
> Do you have any idea how to find current priority level (so I could increase
> 1 by 1).
>
> Regards.
>
> 2008/10/1 Leif Mortenson <leif@...>
>>
>> Stas,
>> On linux, open your wrapper shell script in an editor and modify the
>> PRIORITY value found in the settings section towards the top.  These
>> are standard nice levels, so look at "man nice" for details.
>>
>> Cheers,
>> Leif
>>
>> On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi Leif.
>> >
>> > 2008/10/1 Leif Mortenson <leif@...>
>> >>
>> >> Stas,
>> >> That's great news.   The memory leaks were in the Java code?  What are
>> >> you maximum memory settings set to?  Are they low enough that the
>> >> entire JVM will fit in memory without any swapping along side the OS
>> >> and other apps being used?  Java performs very poorly when its memory
>> >> is being swapped out. (Not a Wrapper issue)
>> >
>> > The leaks were in JNI code and quickly took the whole memory. This
>> > caused
>> > Java to swap.
>> >
>> >>
>> >> About the CPU, I reread this thread but I don't think you ever told me
>> >> what platform you are running on.  That will make a big difference.
>> >> Under UNIX, there is a setting in the shell script which allows you to
>> >> specify a "nice" level to control the priority.
>> >
>> > We use Linux - CentOS distro. What setting we should look to?
>> >
>> >>
>> >> On Windows, it is done using the
>> >> wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
>> >> read the warnings in the documentation.
>> >>
>> >>
>> >> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>> >>
>> >> Normally on most platforms, the OS gives priority to the Windowing
>> >> system and those processes to make them more responsive.  That is why
>> >> on UNIX, it is good to run servers in a headless environment.
>> >
>> > Hmm, we running the server without any X installed, strictly via console
>> > -
>> > is this what you call headless?
>> >
>> > Actually, this is the main app the server was targeted to, so we indeed
>> > prefer to give it all the priority we can (without hanging the OS of
>> > course).
>> >
>> > Regards.
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Wrapper-user mailing list
>> > Wrapper-user@...
>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Wrapper-user mailing list
>> Wrapper-user@...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Fwd: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif.

Any comment on the below?

Regards.

---------- Forwarded message ----------
From: Stas Oskin <stas.oskin@...>
Date: 2008/10/5
Subject: Re: [Wrapper-user] Jar works with console, throws exceptions when launched via start?
To: ‏wrapper-user@...


Hi Lee.

You mean that the wrapper actually gets a higher priority then the JVM it launches?

Regards.

2008/10/5 Leif Mortenson <leif@...>

Stas,
I was able to to check the default priorities using the following command:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm

On Ubuntu, the Wrapper is defaulting to a nice level of 0 and a
real-time priority of 24, but the JVM is set to a nice level of 0 and
a real-time priority of 19.
According to the nice manual however, the range of possible values is
-20 (most favorable) to 19 (least favorable)

If I set the PRIORITY in the script to 5 then the nice levels both get
set to 5, but the real-time priorities are 19 and 15 respectively.
This is actually lower priority.
Setting priorities to a value higher than 0 requires root privilege.

If do so and set it to -5, then the nice levels are both -5, and the
real-time priorities are 29 and 26 respectively.

So quick answer, the default is 0.   I need to look into the real-time
priority more on my end.   you are probable seeing the lower priority
do to this difference in real-time priorities between the top level
wrapper process and its child java process.  I had not noticed this
before.

Cheers,
Leif

On Wed, Oct 1, 2008 at 11:30 PM, Stas Oskin <stas.oskin@...> wrote:
> Hi Leif.
>
> Thanks, I see.
>
> Do you have any idea how to find current priority level (so I could increase
> 1 by 1).
>
> Regards.
>
> 2008/10/1 Leif Mortenson <leif@...>
>>
>> Stas,
>> On linux, open your wrapper shell script in an editor and modify the
>> PRIORITY value found in the settings section towards the top.  These
>> are standard nice levels, so look at "man nice" for details.
>>
>> Cheers,
>> Leif
>>
>> On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi Leif.
>> >
>> > 2008/10/1 Leif Mortenson <leif@...>
>> >>
>> >> Stas,
>> >> That's great news.   The memory leaks were in the Java code?  What are
>> >> you maximum memory settings set to?  Are they low enough that the
>> >> entire JVM will fit in memory without any swapping along side the OS
>> >> and other apps being used?  Java performs very poorly when its memory
>> >> is being swapped out. (Not a Wrapper issue)
>> >
>> > The leaks were in JNI code and quickly took the whole memory. This
>> > caused
>> > Java to swap.
>> >
>> >>
>> >> About the CPU, I reread this thread but I don't think you ever told me
>> >> what platform you are running on.  That will make a big difference.
>> >> Under UNIX, there is a setting in the shell script which allows you to
>> >> specify a "nice" level to control the priority.
>> >
>> > We use Linux - CentOS distro. What setting we should look to?
>> >
>> >>
>> >> On Windows, it is done using the
>> >> wrapper.ntservice.process_priority=NORMAL property.  Please be sure to
>> >> read the warnings in the documentation.
>> >>
>> >>
>> >> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>> >>
>> >> Normally on most platforms, the OS gives priority to the Windowing
>> >> system and those processes to make them more responsive.  That is why
>> >> on UNIX, it is good to run servers in a headless environment.
>> >
>> > Hmm, we running the server without any X installed, strictly via console
>> > -
>> > is this what you call headless?
>> >
>> > Actually, this is the main app the server was targeted to, so we indeed
>> > prefer to give it all the priority we can (without hanging the OS of
>> > course).
>> >
>> > Regards.
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Wrapper-user mailing list
>> > Wrapper-user@...
>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Wrapper-user mailing list
>> Wrapper-user@...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
Currently, the Wrapper is not doing anything special with the process
priorities.  It appears that the OS launches all "top-level" processes
at the same level.  Ie the Wrapper, or Java when run standalone.  Then
child processes are given a lower priority.  When Java is run under
the Wrapper, this means that it is getting a slightly lower priority
than it would if it was run standalone.

We are looking into options to work around this.

Cheers,
Leif

On Mon, Oct 6, 2008 at 4:00 AM, Stas Oskin <stas.oskin@...> wrote:

> Hi Lee.
>
> You mean that the wrapper actually gets a higher priority then the JVM it
> launches?
>
> Regards.
>
> 2008/10/5 Leif Mortenson <leif@...>
>>
>> Stas,
>> I was able to to check the default priorities using the following command:
>> ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
>>
>> On Ubuntu, the Wrapper is defaulting to a nice level of 0 and a
>> real-time priority of 24, but the JVM is set to a nice level of 0 and
>> a real-time priority of 19.
>> According to the nice manual however, the range of possible values is
>> -20 (most favorable) to 19 (least favorable)
>>
>> If I set the PRIORITY in the script to 5 then the nice levels both get
>> set to 5, but the real-time priorities are 19 and 15 respectively.
>> This is actually lower priority.
>> Setting priorities to a value higher than 0 requires root privilege.
>>
>> If do so and set it to -5, then the nice levels are both -5, and the
>> real-time priorities are 29 and 26 respectively.
>>
>> So quick answer, the default is 0.   I need to look into the real-time
>> priority more on my end.   you are probable seeing the lower priority
>> do to this difference in real-time priorities between the top level
>> wrapper process and its child java process.  I had not noticed this
>> before.
>>
>> Cheers,
>> Leif
>>
>> On Wed, Oct 1, 2008 at 11:30 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi Leif.
>> >
>> > Thanks, I see.
>> >
>> > Do you have any idea how to find current priority level (so I could
>> > increase
>> > 1 by 1).
>> >
>> > Regards.
>> >
>> > 2008/10/1 Leif Mortenson <leif@...>
>> >>
>> >> Stas,
>> >> On linux, open your wrapper shell script in an editor and modify the
>> >> PRIORITY value found in the settings section towards the top.  These
>> >> are standard nice levels, so look at "man nice" for details.
>> >>
>> >> Cheers,
>> >> Leif
>> >>
>> >> On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...>
>> >> wrote:
>> >> > Hi Leif.
>> >> >
>> >> > 2008/10/1 Leif Mortenson <leif@...>
>> >> >>
>> >> >> Stas,
>> >> >> That's great news.   The memory leaks were in the Java code?  What
>> >> >> are
>> >> >> you maximum memory settings set to?  Are they low enough that the
>> >> >> entire JVM will fit in memory without any swapping along side the OS
>> >> >> and other apps being used?  Java performs very poorly when its
>> >> >> memory
>> >> >> is being swapped out. (Not a Wrapper issue)
>> >> >
>> >> > The leaks were in JNI code and quickly took the whole memory. This
>> >> > caused
>> >> > Java to swap.
>> >> >
>> >> >>
>> >> >> About the CPU, I reread this thread but I don't think you ever told
>> >> >> me
>> >> >> what platform you are running on.  That will make a big difference.
>> >> >> Under UNIX, there is a setting in the shell script which allows you
>> >> >> to
>> >> >> specify a "nice" level to control the priority.
>> >> >
>> >> > We use Linux - CentOS distro. What setting we should look to?
>> >> >
>> >> >>
>> >> >> On Windows, it is done using the
>> >> >> wrapper.ntservice.process_priority=NORMAL property.  Please be sure
>> >> >> to
>> >> >> read the warnings in the documentation.
>> >> >>
>> >> >>
>> >> >>
>> >> >> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>> >> >>
>> >> >> Normally on most platforms, the OS gives priority to the Windowing
>> >> >> system and those processes to make them more responsive.  That is
>> >> >> why
>> >> >> on UNIX, it is good to run servers in a headless environment.
>> >> >
>> >> > Hmm, we running the server without any X installed, strictly via
>> >> > console
>> >> > -
>> >> > is this what you call headless?
>> >> >
>> >> > Actually, this is the main app the server was targeted to, so we
>> >> > indeed
>> >> > prefer to give it all the priority we can (without hanging the OS of
>> >> > course).
>> >> >
>> >> > Regards.
>> >> >
>> >> >
>> >> >
>> >> > -------------------------------------------------------------------------
>> >> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> >> > challenge
>> >> > Build the coolest Linux based applications with Moblin SDK & win
>> >> > great
>> >> > prizes
>> >> > Grand prize is a trip for two to an Open Source event anywhere in the
>> >> > world
>> >> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> >> > _______________________________________________
>> >> > Wrapper-user mailing list
>> >> > Wrapper-user@...
>> >> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >> >
>> >> >
>> >>
>> >>
>> >> -------------------------------------------------------------------------
>> >> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> >> challenge
>> >> Build the coolest Linux based applications with Moblin SDK & win great
>> >> prizes
>> >> Grand prize is a trip for two to an Open Source event anywhere in the
>> >> world
>> >> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> >> _______________________________________________
>> >> Wrapper-user mailing list
>> >> Wrapper-user@...
>> >> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Wrapper-user mailing list
>> > Wrapper-user@...
>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Wrapper-user mailing list
>> Wrapper-user@...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the update, Leif.

Stas.

2008/10/14 Leif Mortenson <leif@...>
Stas,
Currently, the Wrapper is not doing anything special with the process
priorities.  It appears that the OS launches all "top-level" processes
at the same level.  Ie the Wrapper, or Java when run standalone.  Then
child processes are given a lower priority.  When Java is run under
the Wrapper, this means that it is getting a slightly lower priority
than it would if it was run standalone.

We are looking into options to work around this.

Cheers,
Leif

On Mon, Oct 6, 2008 at 4:00 AM, Stas Oskin <stas.oskin@...> wrote:
> Hi Lee.
>
> You mean that the wrapper actually gets a higher priority then the JVM it
> launches?
>
> Regards.
>
> 2008/10/5 Leif Mortenson <leif@...>
>>
>> Stas,
>> I was able to to check the default priorities using the following command:
>> ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
>>
>> On Ubuntu, the Wrapper is defaulting to a nice level of 0 and a
>> real-time priority of 24, but the JVM is set to a nice level of 0 and
>> a real-time priority of 19.
>> According to the nice manual however, the range of possible values is
>> -20 (most favorable) to 19 (least favorable)
>>
>> If I set the PRIORITY in the script to 5 then the nice levels both get
>> set to 5, but the real-time priorities are 19 and 15 respectively.
>> This is actually lower priority.
>> Setting priorities to a value higher than 0 requires root privilege.
>>
>> If do so and set it to -5, then the nice levels are both -5, and the
>> real-time priorities are 29 and 26 respectively.
>>
>> So quick answer, the default is 0.   I need to look into the real-time
>> priority more on my end.   you are probable seeing the lower priority
>> do to this difference in real-time priorities between the top level
>> wrapper process and its child java process.  I had not noticed this
>> before.
>>
>> Cheers,
>> Leif
>>
>> On Wed, Oct 1, 2008 at 11:30 PM, Stas Oskin <stas.oskin@...> wrote:
>> > Hi Leif.
>> >
>> > Thanks, I see.
>> >
>> > Do you have any idea how to find current priority level (so I could
>> > increase
>> > 1 by 1).
>> >
>> > Regards.
>> >
>> > 2008/10/1 Leif Mortenson <leif@...>
>> >>
>> >> Stas,
>> >> On linux, open your wrapper shell script in an editor and modify the
>> >> PRIORITY value found in the settings section towards the top.  These
>> >> are standard nice levels, so look at "man nice" for details.
>> >>
>> >> Cheers,
>> >> Leif
>> >>
>> >> On Wed, Oct 1, 2008 at 9:44 PM, Stas Oskin <stas.oskin@...>
>> >> wrote:
>> >> > Hi Leif.
>> >> >
>> >> > 2008/10/1 Leif Mortenson <leif@...>
>> >> >>
>> >> >> Stas,
>> >> >> That's great news.   The memory leaks were in the Java code?  What
>> >> >> are
>> >> >> you maximum memory settings set to?  Are they low enough that the
>> >> >> entire JVM will fit in memory without any swapping along side the OS
>> >> >> and other apps being used?  Java performs very poorly when its
>> >> >> memory
>> >> >> is being swapped out. (Not a Wrapper issue)
>> >> >
>> >> > The leaks were in JNI code and quickly took the whole memory. This
>> >> > caused
>> >> > Java to swap.
>> >> >
>> >> >>
>> >> >> About the CPU, I reread this thread but I don't think you ever told
>> >> >> me
>> >> >> what platform you are running on.  That will make a big difference.
>> >> >> Under UNIX, there is a setting in the shell script which allows you
>> >> >> to
>> >> >> specify a "nice" level to control the priority.
>> >> >
>> >> > We use Linux - CentOS distro. What setting we should look to?
>> >> >
>> >> >>
>> >> >> On Windows, it is done using the
>> >> >> wrapper.ntservice.process_priority=NORMAL property.  Please be sure
>> >> >> to
>> >> >> read the warnings in the documentation.
>> >> >>
>> >> >>
>> >> >>
>> >> >> http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-process-priority.html
>> >> >>
>> >> >> Normally on most platforms, the OS gives priority to the Windowing
>> >> >> system and those processes to make them more responsive.  That is
>> >> >> why
>> >> >> on UNIX, it is good to run servers in a headless environment.
>> >> >
>> >> > Hmm, we running the server without any X installed, strictly via
>> >> > console
>> >> > -
>> >> > is this what you call headless?
>> >> >
>> >> > Actually, this is the main app the server was targeted to, so we
>> >> > indeed
>> >> > prefer to give it all the priority we can (without hanging the OS of
>> >> > course).
>> >> >
>> >> > Regards.
>> >> >
>> >> >
>> >> >
>> >> > -------------------------------------------------------------------------
>> >> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> >> > challenge
>> >> > Build the coolest Linux based applications with Moblin SDK & win
>> >> > great
>> >> > prizes
>> >> > Grand prize is a trip for two to an Open Source event anywhere in the
>> >> > world
>> >> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> >> > _______________________________________________
>> >> > Wrapper-user mailing list
>> >> > Wrapper-user@...
>> >> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >> >
>> >> >
>> >>
>> >>
>> >> -------------------------------------------------------------------------
>> >> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> >> challenge
>> >> Build the coolest Linux based applications with Moblin SDK & win great
>> >> prizes
>> >> Grand prize is a trip for two to an Open Source event anywhere in the
>> >> world
>> >> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> >> _______________________________________________
>> >> Wrapper-user mailing list
>> >> Wrapper-user@...
>> >> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Wrapper-user mailing list
>> > Wrapper-user@...
>> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
>> >
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Wrapper-user mailing list
>> Wrapper-user@...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Wrapper-user mailing list
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Stas Oskin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif.

How are you?

Currently, the Wrapper is not doing anything special with the process
priorities.  It appears that the OS launches all "top-level" processes
at the same level.  Ie the Wrapper, or Java when run standalone.  Then
child processes are given a lower priority.  When Java is run under
the Wrapper, this means that it is getting a slightly lower priority
than it would if it was run standalone.

We are looking into options to work around this.

I'm looking to give a 2nd try for Tanuki wrapper - any idea if this issue was resolved on Linux?

Thanks.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Jar works with console, throws exceptions when launched via start?

by Leif Mortenson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stas,
I have been looking into this again the last couple days.  While I
can't say that I understand it fully, I am getting closer to doing so.

If you run "ps -eo pid,ni,pri,comm" you will see the nice level along
with the priority.   The priority actually changes over time depending
on the CPU usage.  For an idle Java application, it is also different
when running a Java application using Swing vs one that is not.

If I run the Wrapper with a nice value of 10, then the Wrapper and
Java are both shifted in priority by exactly 10 as expected.

On my linux machine, running a headless Java application under the
Wrapper, the wrapper process will have a priority of 24 and java will
be 17.  Another test had it at 19 however.
If I use the generated command line to launch java directly it will
have a priority of 19.
This means that java gets a lower priority when running under the
Wrapper as you reported.

The thing that I am yet to understand is why the stand alone Java is
not getting the same priority as the Wrapper, 24.

I did some experiments with loading up Java etc and it appears to
dynamically change the priority depending on other demands on the
system.  In one test, the Wrapper had priority 24, but the java
process fluctuated between 20 and 22.

If anyone could shed some light on how this is supposed to be working
I would appreciate the input.  Ideally it would be nice if Java always
got the same default idle priority when running under the Wrapper as
when running standalone.  It does sometimes, but most of the time it
is lower.

A work around is to set the PRIORITY in the shell script to -2.  That
requires that the user be root to do so however.

Cheers,
Leif

On Thu, Aug 6, 2009 at 6:47 AM, Stas Oskin<stas.oskin@...> wrote:

> Hi Leif.
>
> How are you?
>
>> Currently, the Wrapper is not doing anything special with the process
>> priorities.  It appears that the OS launches all "top-level" processes
>> at the same level.  Ie the Wrapper, or Java when run standalone.  Then
>> child processes are given a lower priority.  When Java is run under
>> the Wrapper, this means that it is getting a slightly lower priority
>> than it would if it was run standalone.
>>
>> We are looking into options to work around this.
>
> I'm looking to give a 2nd try for Tanuki wrapper - any idea if this issue
> was resolved on Linux?
>
> Thanks.

--
Leif Mortenson
Tanuki Software, Ltd.
6-16-7-1001 Nishi-Kasai, Edogawa-ku
Tokyo 134-0088 Japan
Tel/Fax: +81-3-3878-3211
http://www.tanukisoftware.com
leif.mortenson@...

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Wrapper-user mailing list
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
< Prev | 1 - 2 | Next >