Re: [Dev] analytics worker overloads CPU after 3 days

2019-03-11 Thread Bernard Paris
Hi again,

in deed:
- after analytics worker restart the CPU load is very low —> ok
- when I send lot of requests to EI the CPU load from analytics worker grows  
to about 100% CPU -> ok
- when the trafic to EI  stops, the worker  CPU load stays around 90-100%, il 
does decrease nor comes back to low level.

Regards,
Bernard



Le 6 mars 2019 à 12:11, Rushmin Fernando 
mailto:rush...@wso2.com>> a écrit :

Hi Bernard,

Were you able to resolve your issue? If yes, please ignore the diagnosis steps 
below.

When there is a high CPU usage,

1) The thread break down of the CPU usage of that process should be taken
2) A thread dump of the JVM should be taken

Then you can identify the thread which is taking the CPU

By reading your descriptions it seems there is a memory related issue in the 
related WSO2 server.

[1] has a good explanation on this topic.

Specifically the 'Java heap space' might be a reason for this behaviour.

When the allocated memory for the JVM (-XmX) is not enough for the application 
to run, the garbage collector frequently tries to free up the memory. This 
process is CPU intensive, thus causes high CPU usage.

The application can reach the max allocated heap size due to ...

1) The allocated max heap is not enough for the intended operation of the 
application. In this case, the needed memory should be planned and allocated.

2) There is a memory leak in the application.

Both of the reasons can be identified by analyzing the heap dump. A heap dump 
is auto-generated when there a heap issue. This is the 'heap-dump.hprof' file 
you observed.

Best Regards,
Rushmin

[1] - https://plumbr.io/outofmemoryerror

[2] - https://www.eclipse.org/mat/


On Mon, Mar 4, 2019 at 1:59 PM Bernard Paris 
mailto:bernard.pa...@uclouvain.be>> wrote:
Hello,

This is java version
java version "1.8.0_192-ea"
Java(TM) SE Runtime Environment (build 1.8.0_192-ea-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b02, mixed mode)

This morning, back from the week-end and  as usual after some 3 days, CPU load 
was 400%.  The JVM rans with options  -Xms512M -Xmx4G
I just restart it with options  -Xms2G -Xmx2G (oracle recommands to make both 
values equals)

When the problem arrives, there is a big  file "heap-dump.hprof" in the log 
directory.   A the moment the file was created, no errors in carbon.log.

Our system (EI+Analytics) waits for this problem to be solved in order to go 
into production mode. So now we are still testing and there are very poor 
datas/trafic to this servers:  all mySQL DBs are 32,1 Mb, a cron process is 
querying the EI server every hours with some tens requests…

Thanks for you help,
Bernard






Le 2 mars 2019 à 11:14, Niveathika Rajendran 
mailto:niveath...@wso2.com>> a écrit :

Hi Bernard,

We haven't come up against this issue, in our testing.

Could you give the following information to narrow down the issue,
1. Is the minimum requirement for SP[1] available in the system?
2. How much TPS are you seeing from EI server?
3. How much data is currently stored in the DB as of now?

[1] https://docs.wso2.com/display/SP430/Installation+Prerequisites

Best Regards,
Niveathika Rajendran,
Senior Software Engineer.
Mobile : +94 077 903 7536

[http://c.content.wso2.com/signatures/wso2-signature-general.png]



On Thu, Feb 28, 2019 at 2:05 PM Bernard Paris 
mailto:bernard.pa...@uclouvain.be>> wrote:
Hi,

using wso2 EI 6.4 Analytics worker:  after about 3 days of running well,  the 
worker process raise almost 400% CPU and the server doesn't respond to requests 
anymore.  I need to kill it then re-run.

Since I'm testing this 6.4 SP software I always had this behavior: it never 
never rans more than 3 days ;-(
I though DB connexion problems could explain this, but no, we do not have DB 
problems since we use mysql.





What could explain this ? … purging process ?
Bernard
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


--
Best Regards

Rushmin Fernando
Technical Lead

WSO2 Inc. - Lean . Enterprise . Middleware

mobile : +94775615183



___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] sFTP error - "cannot resolve replyFile "

2019-03-11 Thread Srivathsan Shanmuganathan
[Adding dev@wso2.org]

On Mon, 11 Mar 2019, 18:53 Srivathsan Shanmuganathan  Hi Sanjay,
> May I know which version of WSO2 EI you are using?
> As I have checked with EI 6.4.0 it seems to be working fine. Could you
> please double check your sftp uri pattern? (If you are using any symbols
> you can encode them and try)
> It would be better if you could kindly share your proxy service and the
> full logs so that we can assist you more.
>
> Thanks
>
> Regards,
> Srivathsan S
>
> On Sun, Feb 24, 2019 at 10:22 PM Sanjay Bawri 
> wrote:
>
>> Hi,
>>
>> I have a service (pasted at the end) that writes to an sFTP server. The
>> service is pasted below. The service works fine when writing the file from
>> an installation of WSO2 EI on local windows machine, however, the same
>> service when deployed to linux throws the below error:
>>
>> *The Error:*
>>
>> ERROR {org.apache.synapse.transport.vfs.VFSTransportSender} -* cannot
>> resolve replyFile 
>> *org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:86)
>> org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:149)
>> org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:111)
>> org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:81)
>> org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:778)
>> org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:658)
>> org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:233)
>> org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:194)
>> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
>> org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595)
>> org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
>> org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
>> org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
>> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
>> org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:80)
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>> java.lang.Thread.run(Thread.java:748)
>>
>>
>> *The service *(there is proxy service that call the below sequence
>> actually, but the problem is just while writing the file to sFTP server,
>> hence pasting just the sequence code):
>>
>> 
>> > onError="fault" xmlns="http://ws.apache.org/ns/synapse;>
>> 
>> 
>> > value="true"/>
>> 
>>
>> 
>> > expression="get-property('SYSTEM_DATE', 'yyMMdd')"
>> name="sdDate" scope="default" />
>> > expression="get-property('SYSTEM_DATE', 'HHmmss')"
>> name="sdTime" scope="default" />
>> > expression="fn:concat(get-property('sdDate'),
>> '_', get-property('ssTime'),'_MyFile.txt')"
>> name="transport.vfs.ReplyFileName"
>> scope="transport" />
>> > value="text/plain"/>
>> 
>> > value="text/plain"/>
>> > value="text/plain"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>>
>> Any guidance is appreciated.
>>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *S.Srivathsan*
> Software Engineer | WSO2
> (M) +94 774606335 | (E) srivath...@wso2.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Obfuscate username from token introspection response

2019-03-11 Thread Maduranga Siriwardena
Hi Sominda,

We can have a configuration to add the optional parameters to the token
introspection response, preferably in the service provider level.

Thanks,
Maduranga.

On Fri, Feb 22, 2019 at 12:21 PM Sominda Gamage  wrote:

> Hello,
>
> This is regarding the git issue [1]
> .
>
> Currently we don't have a method to omit or obfuscate username and
> clientID identifiers from the introspection response. We cannot omit the
> two identifiers from the response since it might create backward compatible
> issues.
>
> One way to solve this would be providing an options to customize
> introspection response in the UI.
> Any feedback on this matter would be appreciated.
>
> [1] - https://github.com/wso2/product-is/issues/4378
>
> regards,
> Sominda.
>
> --
> *Sominda Gamage* | Software Engineer| WSO2 Inc. 
> (M)+94 719873902 | (E) somi...@wso2.com
> 
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*Maduranga Siriwardena* | Associated Technical Lead | WSO2 Inc.
+94718990591 | madura...@wso2.com



___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] analytics worker overloads CPU after 3 days

2019-03-11 Thread Bernard Paris
Hello,

As on every Mondays, analytics worker runs to  almost 400% CPU load.
The process was launched with -Xms6G -Xmx6G, anyway I found this kind repeated 
error in my logs

java.lang.OutOfMemoryError: GC overhead limit exceeded

meaning to me the are probably some memory leaks issues with this application, 
don't you think so ?

By the way, I can watch when the java process is running in "normal condition"  
and responding ok, that the permanent CPU load is almost 100%.  That seems to 
be very big for a server which does almost nothing at all  (practically no data 
sent to it).

Regards,
Bernard



Le 6 mars 2019 à 12:11, Rushmin Fernando 
mailto:rush...@wso2.com>> a écrit :

Hi Bernard,

Were you able to resolve your issue? If yes, please ignore the diagnosis steps 
below.

When there is a high CPU usage,

1) The thread break down of the CPU usage of that process should be taken
2) A thread dump of the JVM should be taken

Then you can identify the thread which is taking the CPU

By reading your descriptions it seems there is a memory related issue in the 
related WSO2 server.

[1] has a good explanation on this topic.

Specifically the 'Java heap space' might be a reason for this behaviour.

When the allocated memory for the JVM (-XmX) is not enough for the application 
to run, the garbage collector frequently tries to free up the memory. This 
process is CPU intensive, thus causes high CPU usage.

The application can reach the max allocated heap size due to ...

1) The allocated max heap is not enough for the intended operation of the 
application. In this case, the needed memory should be planned and allocated.

2) There is a memory leak in the application.

Both of the reasons can be identified by analyzing the heap dump. A heap dump 
is auto-generated when there a heap issue. This is the 'heap-dump.hprof' file 
you observed.

Best Regards,
Rushmin

[1] - https://plumbr.io/outofmemoryerror

[2] - https://www.eclipse.org/mat/


On Mon, Mar 4, 2019 at 1:59 PM Bernard Paris 
mailto:bernard.pa...@uclouvain.be>> wrote:
Hello,

This is java version
java version "1.8.0_192-ea"
Java(TM) SE Runtime Environment (build 1.8.0_192-ea-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b02, mixed mode)

This morning, back from the week-end and  as usual after some 3 days, CPU load 
was 400%.  The JVM rans with options  -Xms512M -Xmx4G
I just restart it with options  -Xms2G -Xmx2G (oracle recommands to make both 
values equals)

When the problem arrives, there is a big  file "heap-dump.hprof" in the log 
directory.   A the moment the file was created, no errors in carbon.log.

Our system (EI+Analytics) waits for this problem to be solved in order to go 
into production mode. So now we are still testing and there are very poor 
datas/trafic to this servers:  all mySQL DBs are 32,1 Mb, a cron process is 
querying the EI server every hours with some tens requests…

Thanks for you help,
Bernard






Le 2 mars 2019 à 11:14, Niveathika Rajendran 
mailto:niveath...@wso2.com>> a écrit :

Hi Bernard,

We haven't come up against this issue, in our testing.

Could you give the following information to narrow down the issue,
1. Is the minimum requirement for SP[1] available in the system?
2. How much TPS are you seeing from EI server?
3. How much data is currently stored in the DB as of now?

[1] https://docs.wso2.com/display/SP430/Installation+Prerequisites

Best Regards,
Niveathika Rajendran,
Senior Software Engineer.
Mobile : +94 077 903 7536

[http://c.content.wso2.com/signatures/wso2-signature-general.png]



On Thu, Feb 28, 2019 at 2:05 PM Bernard Paris 
mailto:bernard.pa...@uclouvain.be>> wrote:
Hi,

using wso2 EI 6.4 Analytics worker:  after about 3 days of running well,  the 
worker process raise almost 400% CPU and the server doesn't respond to requests 
anymore.  I need to kill it then re-run.

Since I'm testing this 6.4 SP software I always had this behavior: it never 
never rans more than 3 days ;-(
I though DB connexion problems could explain this, but no, we do not have DB 
problems since we use mysql.





What could explain this ? … purging process ?
Bernard
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


--
Best Regards

Rushmin Fernando
Technical Lead

WSO2 Inc. - Lean . Enterprise . Middleware

mobile : +94775615183



___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] UserIdentityManagementAdmin service does not return correct set of challenge questions

2019-03-11 Thread Isura Karunaratne
@Sajith Ekanayaka  ,

What is the service you used? is that
ChallengeQuestionManagementAdminService?
ChallengeQuestionManagementAdminService should be used with the new
Identity management implementation.

Cheers,
Isura.

On Mon, Mar 11, 2019 at 12:11 AM Sajith Ekanayaka  wrote:

> Hi all,
>
> I observed the same in WUM updated 5.3.0 and 5.7.0 packs as well. Is this
> an expected behavior?
>
> Thanks,
> Sajith
>
> On Tue, Jul 17, 2018 at 12:05 AM Rajith Roshan  wrote:
>
>> Hi Devs,
>>
>> When I add a challenge question to existing challenge set ot create new
>> challenge question set from IS 5.3.0 carbon console, and when I invoke the
>> "getAllChallengeQuestions" operation in
>> UserIdentityManagementAdminService, it  returns the only old set of
>> challenge question. The newly added ones are not visible.
>>
>> And also , when I add a new question using the "setChallengeQuestions" in
>> admin service, its get added, and I could not see this newly added question
>> in carbon console as well. And also If I invoke the "
>> getAllChallengeQuestions" method after adding a challenge question, it
>> only shows me the newly added one only.
>>
>> Your inputs regarding this is highly appreciated.
>>
>> Thanks!
>> Rajith
>>
>> --
>> Rajith Roshan
>> Senior Software Engineer, WSO2 Inc.
>> Mobile: +94-717-064-214
>>
>
>
> --
> *Sajith Ekanayaka*
> Software Engineer | WSO2
>
> Mobile: +94 714003025
> Web: http://wso2.com
>
> 
>


-- 

*Isura Dilhara Karunaratne*
Associate Technical Lead | WSO2 
*lean.enterprise.middleware*
Email: is...@wso2.com
Mob : +94 772 254 810
Blog : http://isurad.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev