BlueBrain / nexus-forge

Building and Using Knowledge Graphs made easy
https://nexus-forge.readthedocs.io
GNU Lesser General Public License v3.0
38 stars 19 forks source link

Many HTTP requests on forge object creation #285

Open mgeplf opened 1 year ago

mgeplf commented 1 year ago

It looks to me like there are 19 connections [full log: 2] where 6 of them are duplicates [1]

Repro:

# turn on debug logging
import logging; logging.basicConfig(level=logging.DEBUG)

forge = KnowledgeGraphForge(
    'https://raw.githubusercontent.com/BlueBrain/nexus-forge/master/examples/notebooks/use-cases/prod-forge-nexus.yml',
    endpoint='https://bbp.epfl.ch/nexus/v1',
    bucket='bbp/atlas',
    token=token
    )

[1] Duplicates:

Requests URL
2 https://bbp.epfl.ch:443 "GET /nexus/v1/projects/bbp/atlas HTTP/1.1" 200 None
2 https://bbp.epfl.ch:443 "GET /nexus/v1/projects/neurosciencegraph/datamodels HTTP/1.1" 200 None
2 https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/bbp/atlas/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None
2 https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/neurosciencegraph/datamodels/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None
3 https://bbp.epfl.ch:443 "POST /nexus/v1/views/neurosciencegraph/datamodels/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FdefaultSparqlIndex/sparql HTTP/1.1" 200 None

[2] Full log:

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /BlueBrain/nexus-forge/master/examples/notebooks/use-cases/prod-forge-nexus.yml HTTP/1.1" 200 642
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/projects/bbp/atlas HTTP/1.1" 200 None
DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/bbp/atlas/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/projects/neurosciencegraph/datamodels HTTP/1.1" 200 None
DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/neurosciencegraph/datamodels/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "POST /nexus/v1/views/neurosciencegraph/datamodels/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FdefaultSparqlIndex/sparql HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "POST /nexus/v1/views/neurosciencegraph/datamodels/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FdefaultSparqlIndex/sparql HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "POST /nexus/v1/views/neurosciencegraph/datamodels/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FdefaultSparqlIndex/sparql HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/bbp/atlas/_/https%3A%2F%2Fbbp.neuroshapes.org HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/bbp/atlas/_/https%3A%2F%2Fneuroshapes.org HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /BlueBrain/nexus-forge/master/examples/configurations/nexus-store/file-to-resource-mapping.hjson HTTP/1.1" 200 269
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/projects/bbp/atlas HTTP/1.1" 200 None
DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/bbp/atlas/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /BlueBrain/nexus-forge/master/examples/configurations/nexus-resolver/term-to-resource-mapping.hjson HTTP/1.1" 200 109
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/projects/neurosciencegraph/datamodels HTTP/1.1" 200 None
DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/neurosciencegraph/datamodels/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /BlueBrain/nexus-forge/master/examples/configurations/nexus-resolver/agent-to-resource-mapping.hjson HTTP/1.1" 200 75
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/projects/bbp/agents HTTP/1.1" 200 None
DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): bbp.epfl.ch:443
DEBUG:urllib3.connectionpool:https://bbp.epfl.ch:443 "GET /nexus/v1/resolvers/bbp/agents/_/https%3A%2F%2Fbluebrainnexus.io%2Fcontexts%2Fmetadata.json HTTP/1.1" 200 None

Edit: 6 instead of 7; note to self, agents != atlas