Friday, December 5, 2014

WorkManager: “Maximum Threads Constraint” vs “Capacity Constraint”

Someone was asking "if we set a limit of the number of concurrent requests using a work manager, what will happen to the other requests incoming when the limit has already been reached?"

On the workmanagr configuration, there is a "Capacity Constraint":
The total number of requests that can be queued or executing before WebLogic Server begins rejecting requests”

What is the difference between “Maximum Threads Constraint” and “Capacity Constraint” ?

https://blogs.oracle.com/imc/entry/weblogic_server_performance_and_tuning1

Max Threads Constraint: Guarantees the number of threads the server will allocate to requests.

Capacity Constraint: Causes the server to reject requests only when it has reached its capacity.

I think it’s safe to set Capacity Constraint to a quite high number (say 100) so as to allow the server to put clients on hold even when it has reached its max threads constraint.

It would be nice to test this….

Tuesday, December 2, 2014

Another nightmare on Remote Desktop Street

Remote Desktop is a stinky piece of code, you can see it by how little it helps you troubleshooting when it fails connecting. The error message is laughable in its generality.

First make sure it's actually listening:

netstat -an | find "3389"

where 3389 is the default port. Don't try to find it in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber because for instance on my WIndows 7 Enteprise this folder doesn't even exist.

You can go through these troubleshooting steps

in my case, I had followed these instructions
Log into the server and press Windows key + R then type MMC.exe .
Click on File > Add/Remove Snap-in > click on Group Policy Object > Add> Finish > OK.
Double click on Local Computer Policy > double click on Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
Limit Number of Connections = 999999.



MMC is Microsoft Management Console - a replacement for direct Registry Manipulation. It stinks, like all Windows UI.

I have done that, and it stopped working. Then I have done exactly the same manipulation, and checking if the flag "remote desktop enabled" was set, and it was not! Enabling it again fixes the issue. This MCC.exe utility is confusing to say the least... just don't play with it...

Wednesday, November 26, 2014

jinfo causing segmentation fault on a 64 bit JVM

On a machine, I have jinfo resolving to:

/usr/bin/jinfo

When I run it against a 64bit JVM, I get:

jinfo -sysprops ${pid}

Attaching to process ID 26267, please wait...
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xaeec7791, pid=31050, tid=2934725520
#
# JRE version: 6.0_33-b03
# Java VM: Java HotSpot(TM) Server VM (20.8-b03 mixed mode linux-x86 )
# Problematic frame:
# C  [libsaproc.so+0x1791]  long double restrict+0x1d
#
# An error report file with more information is saved as:
# /opt/oracle/usr/hs_err_pid31050.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted



and the file /opt/oracle/usr/hs_err_pid31050.log says:


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xaeec7791, pid=31050, tid=2934725520
#
# JRE version: 6.0_33-b03
# Java VM: Java HotSpot(TM) Server VM (20.8-b03 mixed mode linux-x86 )
# Problematic frame:
# C  [libsaproc.so+0x1791]  long double restrict+0x1d
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#



The problem evidently is that THAT jinfo is a 32 bit version, and I should rather use /usr/lib/jvm/java-1.6.0-sun-1.6.0.81.x86_64/bin/jinfo