1

I'm very new to GIS. With MapServer, I'm calling four kinds of data, but only with this one am I having some HTTP 504 error message randomly. The other three never have that error, but only with this map:

MAP
  NAME XXX
  STATUS ON
  SIZE 600 600
  EXTENT 49782.1874916550004855 5149959.5214843796566129 664282.1874916550004855 7904959.5214843796566129
  UNITS METERS
  SHAPEPATH "rast"
  IMAGECOLOR 255 255 255
  TEMPLATEPATTERN "itasca"
  WEB
        METADATA
            "wms_enable_request" "*"
        END
  END
  IMAGETYPE PNG
  CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt"
  DEBUG 5
  PROJECTION
        "init=epsg:3857"
  END
  WEB
        IMAGEPATH "/tmp"
        IMAGEURL "http://XXXXXX/tmp/"
        METADATA
            "wfs_title"            "XXXXXX"
            "wfs_onlineresource"   "http://XXXXXX/cgi-bin/mapserv?"
            "wfs_srs"               "EPSG:32719 EPSG:900913 EPSG:4326 EPSG:3857"
            "ows_schemas_location" "http://ogc.dmsolutions.ca"
        END
  END
  LAYER
        NAME balance_hidrico_1
        TYPE raster
        STATUS ON
        DATA "PG:host=192.168.1.XXX port=5432 dbname='XXXXXX' user='postgres' password='XXX' schema='raster' table='balance_hidrico_1' mode='2'"
        DEBUG 5
        PROJECTION
            "init=epsg:32719"
        END
        PROCESSING "SCALE=AUTO"
        CLASS
            NAME "-15"
            EXPRESSION ([pixel] <= -15)
            COLOR "#b87711"
        END   
    END
    # etc...(more LAYERS)
END # Map File

I'm calling via JavaScript with OpenLayers 3 with this:

this.state.bal_hidrico = new ol.layer.Tile({
            source: new ol.source.TileWMS({
                url: "http:/XXXXX/cgi-bin/mapserv?",
                serverType: 'mapserver',
                crossOrigin: 'anonymous',
                params: {
                    'LAYERS': 'balance_hidrico_1',
                    'FORMAT': 'image/png',
                    'map' : '/opt/mapfile/map_balance_hidrico.map',
                    'TILED': true
                }
            })
        });

As I said, it's only problem with this map and not always...

Could this be a problem with the raster size on the database?

closed as off-topic by nmtoken, Andre Silva, Vince, Kersten, Mapperz Dec 29 '16 at 16:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – nmtoken, Andre Silva, Vince, Kersten, Mapperz
If this question can be reworded to fit the rules in the help center, please edit the question.

  • UPDATE: Well, I've exported the table of the database according to one of those rasters. It size is 15.3MB, compared to the other ones which sizes are near to 1.2MB - 1.8MB. I think that's the problem... now how could I handle those table with that size to avoid the 504 – pmiranda Dec 26 '16 at 18:42
  • You have two WEB sections, which seems a bit odd. – nmtoken Dec 26 '16 at 21:34
  • But can produce a conflict? How it should be? – pmiranda Dec 27 '16 at 14:15
  • But can produce a conflict? to be honest I don't know, but I always just have one web section and one web > metadata section, no matter if I'm providing just a WMS or A WMS, plus WCS, plus WFS. you can use ows_... for metadata that is common to your wfs plus wms, and wfs_ and wms_ for properties specific to a service type. – nmtoken Dec 28 '16 at 10:30
  • Putting aside getting your service to work in OpenLayers, and concentrating on whether the service is actually correctly configured, when you do a GetCapabilities request for your WMS in a browser, like: http:/XXXXX/cgi-bin/mapserv?request=GetCapabilities&service=WMS& do you get any errors? – nmtoken Dec 28 '16 at 10:33