kartverket / NGIS-OpenAPI

Tjenestebasert grensesnitt mot NGIS, basert på OpenAPI og REST.
4 stars 10 forks source link

Treg oppdatering/Timeout for updateDatasetFeatureAttributes #97

Closed larsop closed 4 months ago

larsop commented 2 years ago

Typiske case er at vi oppdaterer 1 rad basert på lokalid.

Også tilgjengelighetstjenesten har problemmer med timeout feil, men jeg vet ikke når det skjer for tilgjengelighetstjenesten, men det ser ihvertfall problem som ikke bare er knyttet til AR5.

Eksempel på typisk input er (fra test)


{
  "opphav" : "NIBIO_webklient",
  "treslag" : "31",
  "kvalitet" : {
    "synbarhet" : "0",
    "målemetode" : "80",
    "nøyaktighet" : 1
  },
  "arealtype" : "60",
  "featuretype" : "ArealressursFlate",
  "informasjon" : "",
  "skogbonitet" : "11",
  "grunnforhold" : "45",
  "kartstandard" : "AR5",
  "datafangstdato" : "2022-09-28",
  "identifikasjon" : {
    "lokalId" : "b49ae37e-cc9b-4e55-96f7-9cb7f1d2b57e",
    "navnerom" : "http://data.geonorge.no/SFKB/FKB-AR5/so",
    "versjonId" : "2022-09-28T14:03:36.139667"
  },
  "oppdateringsdato" : "2019-03-29T12:06:13",
  "verifiseringsdato" : "2022-09-28",
  "registreringsversjon" : {
    "produkt" : "FKB-AR5",
    "versjon" : "4.5 20140301"
  }
}

Noen ganger for vi timeout some dette.


org.springframework.web.client.HttpServerErrorException$GatewayTimeout: 504 Gateway Time-out: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11
/DTD/xhtml11.dtd"><EOL><EOL><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><EOL>  <head><EOL>    <title>The page is temporarily unavailable</title><EOL>    <meta ht
tp-equiv="Content-Type" content="text/html; charset=UTF-8" /><EOL>    <style type="text/css"><EOL>      /*<![CDATA[*/<EOL>      body {<EOL>        background-color: #fff;<EOL
>        color: #000;<EOL>        font-size: 0.9em;<EOL>        font-family: sans-serif, helvetica;<EOL>        margin: 0;<EOL>        padding: 0;<EOL>      }<EOL>      :link
 {<EOL>        color: #c00;<EOL>      }<EOL>      :visited {<EOL>        color: #c00;<EOL>      }<EOL>      a:hover {<EOL>        color: #f50;<EOL>      }<EOL>      h1 {<EOL>        text-align: center;<EOL>        margin: 0;<EOL>        padding: 0.6em 2em 0.4em;<EOL>        background-color: #10B981;<EOL>        color: #fff;<EOL>        font-weight: normal;<EOL>        font-size: 1.75em;<EOL>        border-bottom: 2px solid #000;<EOL>      }<EOL>      h1 strong {<EOL>        font-weight: bold;<EOL>        font-size: 1.5em;<EOL>      }<EOL>      h2 {<EOL>        text-align: center;<EOL>        background-color: #10B981;<EOL>        font-size: 1.1em;<EOL>        font-weight: bold;<EOL>        color: #fff;<EOL>        margin: 0;<EOL>        padding: 0.5em;<EOL>        border-bottom: 2px solid #000;<EOL>      }<EOL>      h3 {<EOL>        text-align: center;<EOL>        background-color: #ff0000;<EOL>        padding: 0.5em;<EOL>        color: #fff;<EOL>      }<EOL>      hr {<EOL>        display: none;<EOL>      }<EOL>      .content {<EOL>        padding: 1em 5em;<EOL>      }<EOL>      .alert {<EOL>        border: 2px solid #000;<EOL>      }<EOL><EOL>      img {<EOL>        border: 2px solid #fff;<EOL>        padding: 2px;<EOL>        margin: 2px;<EOL>      }<EOL>      a:hover img {<EOL>        border: 2px solid #294172;<EOL>      }<EOL>      .logos {<EOL>        margin: 1em;<EOL>        text-align: center;<EOL>      }<EOL>      /*]]>*/<EOL>    </style><EOL>  </head><EOL><EOL>  <body><EOL>    <h1><strong>nginx error!</strong></h1><EOL><EOL>    <div class="content"><EOL>      <h3><EOL>        The page you are looking for is temporarily unavailable. Please try<EOL>        again later.<EOL>      </h3><EOL><EOL>      <div class="alert"><EOL>        <h2>Website Administrator</h2><EOL>        <div class="content"><EOL>          <p><EOL>            Something has triggered missing webpage on your website. This is the<EOL>            default error page for <strong>nginx</strong> that is distributed<EOL>            with Rocky Linux. It is located<EOL>            <tt>/usr/share/nginx/html/50x.html</tt><EOL>          </p><EOL><EOL>          <p><EOL>            You should customize this error page for your own site or edit the<EOL>            <tt>error_page</tt> directive in the<EOL>            <strong>nginx</strong> configuration file<EOL>            <tt>/etc/nginx/nginx.conf</tt>.<EOL>          </p><EOL><EOL>          <p><EOL>            For information on Rocky Linux, please visit the<EOL>            <a href="https://www.rockylinux.org/">Rocky Linux website</a>. The<EOL>            documentation for Rocky Linux is<EOL>            <a href="https://www.rockylinux.org/"<EOL>              >available on the Rocky Linux website</a<EOL>            >.<EOL>          </p><EOL>        </div><EOL>      </div><EOL><EOL>      <div class="logos"><EOL>        <a href="http://nginx.net/"<EOL>          ><img<EOL>            src="nginx-logo.png"<EOL>            alt="[ Powered by nginx ]"<EOL>            width="121"<EOL>            height="32"<EOL>        /></a><EOL>        <a href="http://www.rockylinux.org/"><img<EOL>            src="poweredby.png"<EOL>            alt="[ Powered by Rocky Linux ]"<EOL>            width="88" height="31" /></a><EOL>        <EOL>      </div><EOL>    </div><EOL>  </body><EOL></html><EOL>"
        at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:116) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:171) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:780) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:738) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:649) ~[spring-web-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at ngis.openapi.client.client.invoker.ApiClient.invokeAPI(ApiClient.java:510) [ngis-openapi-api-client-0.0.1-SNAPSHOT.jar:?]

Andre ganger tar det bare lang tid. Under er noen tider fra prod. Her ser vi at det kan over et minutt. Har også et eksempel på to minutter.

5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9207 lokalId 6a7e440f-7677-4e9b-b28f-bcacdec451dd - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9226 lokalId c5205ad3-a6c9-4e60-b595-14f32570405c - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9123 lokalId 515947e1-b550-4d0c-8659-765d2c6ca300 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8700 lokalId e33462c2-b454-4c50-812c-dc66c26c9c5b - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9211 lokalId a97ff8c4-cbc4-4e94-8b00-df0ac1796d59 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9083 lokalId f889af52-c9ee-4eff-81fc-da398c1a9587 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8684 lokalId 888ddaec-35b2-11ed-943e-7f3a4924cb3d - 
r5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:76393 lokalId 055f823e-0dbe-4f9f-8483-c02846369da6 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:11357 lokalId 23fc6f1c-6d2e-4e7c-8ae0-f28f2d2de0b6 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:11383 lokalId 2d083232-052b-464c-83ab-415eac52e1d5 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:11046 lokalId 071a287c-1bf2-4527-904e-30b1d7aaea21 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8793 lokalId 80e9d912-35bc-11ed-8201-3f550ca5c605 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8478 lokalId 9c26f4ee-35bc-11ed-8207-c77ddbeb34df - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8271 lokalId fb5e00a6-35bc-11ed-977f-2bd9eec18279 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8339 lokalId e4ca4588-35bd-11ed-978f-c71b616a7c3f - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8365 lokalId 31423afc-275d-4aa7-8b7b-5d9e88999028 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9638 lokalId 975fbd19-934d-42fe-88b1-db0da5848868 - 
r5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8675 lokalId 16f07da3-f89e-4904-877b-a1878c88d496 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9054 lokalId c180d9a5-169d-43a7-8075-ad22775e9651 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:9269 lokalId e99c47a4-ba2e-490b-ad92-5f794c28708a - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8498 lokalId 67a9a223-1b6d-474a-8dc1-b921829a0e5e - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8568 lokalId 4473f1d1-5be8-4e55-b305-060218db6a60 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8603 lokalId dd6a495d-f246-465a-9d1a-0a1f687db66d - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8327 lokalId 82b9116e-35c0-11ed-bf02-abc64d2e753d - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8351 lokalId d764c79e-73a3-4a58-a97c-976b0ccaa102 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:11485 lokalId b89ab4cc-35c0-11ed-ad40-bbf0d9c2ef9b - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8536 lokalId 18aac604-5e6a-4210-9f62-b7b7d068872d - 
r5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:37681 lokalId a14b6b55-ab09-482d-8c9c-53b08a485528 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8464 lokalId eaf43dba-35c2-11ed-a5ca-afc472e0bc65 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:7863 lokalId 3ec7a8aa-35c3-11ed-a5d2-0bf31be00fb4 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:7682 lokalId dfab135b-7415-44ab-9c49-c2a181168833 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:7854 lokalId f37de2ba-9cee-4241-a02d-140c448a68f2 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8040 lokalId d822a564-5025-468f-a83f-ccabb2c36862 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8223 lokalId bbaf7ae0-35c4-11ed-a6cd-c753bcf1a4de - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:7835 lokalId 72a4e56e-35c5-11ed-a6d6-3b084a1c5276 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8221 lokalId c059246e-35c5-11ed-a6dc-b7ba929949e4 - 
r5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8154 lokalId 27a98b90-35c6-11ed-8b5d-83032b6221e1 - 
5NgisOpenApiIntergration.upadteDatasetFeatureAttribute(Ar5NgisOpenApiIntergration.java:825) 825 - leave, ms. used:8376 lokalId db362dc5-102a-44f7-bebe-1bee68ebad39 - 

Her et bilde fra test også der tar dette over 6 sekunder, men for f.eks en release lock tar noen milli sekunder så det tyder på at det ikke problemmer med nettet.

Screenshot 2022-09-28 at 14 13 48

larsop commented 2 years ago

Norkart fant er en bug i QMS som kan forårsake Timeout og Kartverket la den i produksjon på Fredag.

larsop commented 2 years ago

Når man jobber på data som ligger i Finmark så går det ofte et par sekunder raskere å oppdatere en enkelt attributt på en rad som man ser i bildet under.

Ar5 er delt opp 3 forskjelige arkiver slik jeg forstår og der arkivet for Finnmark er mye mindre , arkivet for Østlandet.

Screenshot 2022-10-03 at 14 41 19

NilsIvarNes commented 4 months ago

Serverprogramvaren er oppdatert etter 2022. Lukkes.