OpenStreetMap经常发送网关超时错误 [英] OpenStreetMap often sends Gateway Timeout error

查看:80
本文介绍了OpenStreetMap经常发送网关超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在程序中使用带有以下代码的传单地图:

I am using a leaflet map in program with the following code:

<style>
     <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
    @import url(//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.2/leaflet.css);
    #map {
        width: 960px;
        height: 500px;
    }
</style>

<body>
   <div id="map"/>
   <script type="text/javascript">
        var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
            osmAttrib = '&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
            osm = L.tileLayer(osmUrl, {maxZoom: 20, attribution: osmAttrib});

        var map = L.map('map').setView([37.5, -115], 6).addLayer(osm);

</body>

但是,我一直在地图上的随机位置上看到一些灰色方块,并且在javascript控制台中收到以下Leaflet错误代码:

However, I keep seeing some grey square on my maps at random positions and I get the following Leaflet error code in the javascript console:

http://a.tile.openstreetmap.org/6/8/25.png 504 (Gateway Timeout)

有人会知道哪里出了问题以及如何解决吗?

Would anyone know what's wrong and how to solve it?

推荐答案

OpenStreetMap磁贴服务器出现50x错误是OSM方面的问题,而不是由您使用(或滥用)OSM磁贴引起的问题在您的网站或应用程序中.

A 50x error from the OpenStreetMap tile servers is a problem caused on the OSM side of things, not a problem caused by your use (or misuse) of OSM tiles in your website or application.

根据问题的具体时间和日期判断,我会做出一个疯狂的假设,并说您是在系统暂时过载时击中了其中一​​个鱿鱼代理服务器从鱿鱼2到鱿鱼3的全范围升级已经持续了几天(请注意,下面的屏幕快照是git repo持有厨师为OSM服务器开发配方,而且 I 可以看到OSM服务器状态的事实真是棒极了.

Judging by the specific time and date of your question, I'll make a wild assumption and say that you were hitting one of the squid proxy servers during a momentary overload of the network while a system-wide upgrade from squid 2 to squid 3 has been going on for the past few days (note the screenshot below is for the git repo holding the chef devops recipes for the OSM servers, and also the fact that I can see the status of the OSM servers is awesome).

请记住,OSM切片服务器和代理服务器由(很棒的)志愿者系统管理员团队维护,尽管他们尽最大努力保持一切正常运行,但是<一个href ="https://wiki.osmfoundation.org" rel ="noreferrer"> OSM基金会不能对服务质量做任何保证.

Please keep in mind that the OSM tile servers and proxy servers are maintained by a team of (awesome) volunteer system administrators and, while they do their best to keep everything up and running, the OSM Foundation can not make any guarantees about the quality of service.

https://operations.osmfoundation.org/(尤其是在 ="https://operations.osmfoundation.org/policies/tiles/" rel ="noreferrer"> https://operations.osmfoundation.org/policies/tiles/

有人会知道怎么了吗?如何解决?

通常,可以通过以下方法解决OSMF服务的暂时故障:

In general, temporarily failures of the OSMF services can be solved by:

  • 耐心等待系统管理员修复问题.
  • 潜伏在OFTC#OSM-dev IRC频道(更多信息在这里)可以特别了解怎么了,礼貌地问他们.如果这样做,不要对那里的人造成干扰.只会减慢速度.
  • 向OSMF捐款,以提高其运营能力.
  • 自愿参加 OSMF运营工作组,或为镜像硬件做出贡献服务器等.
  • Having patience and waiting for the sysadmins to fix things.
  • Lurking at the OFTC #OSM-dev IRC channel (more info here) to know specifically what's wrong and politely asking. If you do so, do not be a nuisance to the people there; it will only slow things down.
  • Donating money to the OSMF so it can increase its operational capabilities.
  • Volunteering to be a part of the OSMF Operations Working Group, or contributing with hardware for mirror servers or the like.

如果您不想受到OSMF的限制,有两种常见的选择:

If you do not want to be bound by the limitations of the OSMF, there are a couple common alternatives:

  • 使用商业磁贴提供商(在此处中列出了一些提供商)
  • 托管您自己的图块(更多信息在这里)
  • 缓存图块.与大多数商业供应商不同,OSM允许您以几乎任何所需的方式存储,代理和缓存磁贴.实际上,只要您采取一些谨慎的措施(即,不要为您的缓存设置种子,否则会触发批量下载),就应该鼓励采取任何能够减轻OSMF服务器负载的事情.
  • Use a commercial tile provider (some of the providers are listed here)
  • Host your own tiles (more information here)
  • Cache the tiles. Unlike most commercial vendors, OSM allows you to store, proxy, and cache the tiles in pretty much whatever way you want. In fact, anything that will lessen the load on the OSMF servers is encouraged, as long as you take a modicum of care (i.e. do not seed your cache, which would trigger bulk downloads).

这篇关于OpenStreetMap经常发送网关超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆