KnowledgeCaptureAndDiscovery / wings

Wings workflow system
http://www.wings-workflows.org
Apache License 2.0
48 stars 21 forks source link

System hangs after multiples queries #88

Open mosoriob opened 5 years ago

mosoriob commented 5 years ago

System hangs after multiples queries. I'm obtaining all the components from MINT and inserting on WINGS. However, the system froze.

Expected Behavior

The system doesn't hang

Current Behavior

The system hangs and wings data section does not upload.

Possible Solution

Related to #87?

Steps to Reproduce

  1. Clone the repo https://github.com/KnowledgeCaptureAndDiscovery/wings-api-scripts
  2. Execute the mint.py.

Detailed Description

I sent 10-20 queries in 10 seconds and WINGS froze. The code that I'm running is available at https://github.com/KnowledgeCaptureAndDiscovery/wings-api-scripts/blob/master/mint.py

Also, the CPU usage is too high

screen shot 2019-02-11 at 8 31 55 pm

IKCAP commented 5 years ago

Could you tell me which is the resource that you are passing to mint.py ?

Edit: The reason I ask is that I tried it on PIHM, and I cannot replicate the issue on my personal WINGS installation. Do you mean that you ran mint.py for multiple model configurations one after the other ?

On 12 Feb 2019, at 17:11, Maximiliano Osorio notifications@github.com wrote:

System hangs after multiples queries. I'm obtaining all the components from MINT and inserting on WINGS. However, the system froze.

Expected Behavior

The system doesn't hang

Current Behavior

The system hangs and wings data section does not upload.

Possible Solution

Related to #87 https://github.com/KnowledgeCaptureAndDiscovery/wings/issues/87?

Steps to Reproduce

Clone the repo https://github.com/KnowledgeCaptureAndDiscovery/wings-api-scripts https://github.com/KnowledgeCaptureAndDiscovery/wings-api-scripts Execute the mint.py. Detailed Description

I sent 10-20 queries in 10 seconds and WINGS froze. The code that I'm running is available at https://github.com/KnowledgeCaptureAndDiscovery/wings-api-scripts/blob/master/mint.py https://github.com/KnowledgeCaptureAndDiscovery/wings-api-scripts/blob/master/mint.py Also, the CPU usage is too high

https://user-images.githubusercontent.com/2365990/52603459-a8bb9e80-2e45-11e9-8aae-669bd806483e.png — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KnowledgeCaptureAndDiscovery/wings/issues/88, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnTC929zYL4j7PolKC7OI6TAj7DW6SKks5vMqhQgaJpZM4a2NSO.

mosoriob commented 5 years ago

This happens after all resources are loaded.

for i in $(cat resources.txt); do  python mint.py -r $i; sleep 10; done
IKCAP commented 5 years ago

Got it, thanks.

On 12 Feb 2019, at 17:34, Maximiliano Osorio notifications@github.com wrote:

This happens after all resources are loaded.

for i in $(cat resources.txt); do python mint.py -r $i; sleep 10; done — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KnowledgeCaptureAndDiscovery/wings/issues/88#issuecomment-462734132, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnTCylHbaTkVwRhvTU2NOxTo2hY-o9Uks5vMq25gaJpZM4a2NSO.

mosoriob commented 5 years ago

I ran perf. perf top, which tells you which functions are in use on your computer right now

screen shot 2019-02-12 at 9 05 03 am

varunratnakar commented 5 years ago

Couldn't replicate in a controlled environment:

  1. Restarted WINGS just before the test
  2. Create a new domain to populate
  3. Did not use WINGS while the script was executing

I suspect that if I don't stick to 3 above, then I might encounter the locks. Will try that next.

Note: found a couple of bad names for inputs (Spaces in the labels. They should be replaced with underscores): ... /components/library.owl#DSSAT_cfg_simple_DSSAT weather file ... /components/library.owl#topoflow_cfg_simple_Rain rate txt file

mosoriob commented 5 years ago

Were you able to read the data on the domain?

varunratnakar commented 5 years ago

Yes am able to read the data fine. Fixed the underscore bug, and ran again:

  1. Restarted WINGS just before the test
  2. Created a new domain to populate
  3. DID use WINGS while the script was executing (read only, no writes)

Still cannot replicate.

mosoriob commented 5 years ago

Ok. I'm going to test without using WINGS in my browser.

varunratnakar commented 5 years ago

Latest test:

  1. Did not restart WINGS
  2. Did not create a new domain
  3. Used WINGS while the script was executing (read only)

Worked fine.

Note: I'm using the WINGS installation on my local machine.

mosoriob commented 5 years ago

Can you test with this resource?

python mint.py -r https://w3id.org/mint/instance/cycles_outputs

How to reproduce?

  1. Create a new domain
  2. Modify the domain variable in config.ini domainWings
  3. Load resource python mint.py -r https://w3id.org/mint/instance/cycles_outputs

Results:

  1. High cpu usage
    12070 root      20   0 23.799g 6.565g  16288 S 101.2 10.5   9:32.85 /docker-java-home/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -+
  2. WINGS frozen at http://ontosoft.isi.edu:7072/wings-portal/users/admin/test7/data

Environment:

  1. Using docker
  2. Server: http://ontosoft.isi.edu:7072/wings-portal/users
  3. Version: https://github.com/KnowledgeCaptureAndDiscovery/wings/commit/944d87601609f82e1f5a60cb49fe414feba869c3

Component json

{
  "inputs": [
    {
      "role": "cycles_season",
      "id": "http://localhost:8080/wings-portal/export/users/admin/test6/components/library.owl#cycles_outputs_cycles_season",
      "dimensionality": "0",
      "type": "http://localhost:8080/wings-portal/export/users/admin/test6/data/ontology.owl#cycles_season",
      "isParam": false,
      "prefix": "-i1"
    },
    {
      "role": "cycles_weatherOutput",
      "id": "http://localhost:8080/wings-portal/export/users/admin/test6/components/library.owl#cycles_outputs_cycles_weatherOutput",
      "dimensionality": "0",
      "type": "http://localhost:8080/wings-portal/export/users/admin/test6/data/ontology.owl#cycles_weatherOutput",
      "isParam": false,
      "prefix": "-i2"
    }
  ],
  "outputs": [
    {
      "role": "cycles_outputs",
      "id": "http://localhost:8080/wings-portal/export/users/admin/test6/components/library.owl#cycles_outputs_cycles_outputs",
      "dimensionality": "0",
      "type": "http://localhost:8080/wings-portal/export/users/admin/test6/data/ontology.owl#cycles_outputs",
      "isParam": false,
      "prefix": "-o1"
    }
  ],
  "rulesText": null,
  "documentation": "Script to group cycles outputs for visualization",
  "id": "http://localhost:8080/wings-portal/export/users/admin/test6/components/library.owl#cycles_outputs",
  "type": 2
}
mosoriob commented 5 years ago

The other resources do not generate the issue

varunratnakar commented 5 years ago

Hmm, I still cannot reproduce this on a wings installation locally. Tried with clean and dirty domain both