先说说本人的开发环境:Win7 + Editplus + VMware(Centos+Samba+Nginx)。用Samba在Centos上把web文件夹(如www)共享,然后在Win7上訪问这个文件夹。

之所以这么用的原因有:

  • 习惯了Windows。效率比較高
  • Editplus编辑器好用,相对于vi系列来说
  • 代码測试环境和服务器执行环境无差异

用了这么些年,事实上有个小问题一直困扰着我。在Win7下改动了某个.html文件。比方test.html 。然后通过http://vm/test.html訪问,会报500错误:



Nginx错误日志里面的内容是:

2015/06/11 16:51:29 [crit] 1787#0: *671 open() “/www/test.html” failed (11: Resource temporarily unavailable), client: 192.168.9.1, server: vm, request: “GET /test.html?9 HTTP/1.1”, host: “vm”

假设直接在Centos上编辑这个文件,是没有这个问题的。所以是Samba导致。

解决方法:

在Samba的配置文件中面增加:

oplocks = no

level2 oplocks = no

重新启动Samba。问题解决。

但不明确是啥意思。。

參考:

http://stackoverflow.com/questions/10202567/nginx-resource-temporarily-unavailable-using-a-samba-share

$(function () {
$('pre.prettyprint code').each(function () {
var lines = $(this).text().split('\n').length;
var $numbering = $('

    ').addClass('pre-numbering').hide();
    $(this).addClass('has-numbering').parent().append($numbering);
    for (i = 1; i ').text(i));
    };
    $numbering.fadeIn(1700);
    });
    });

Samba & Nginx - Resource temporarily unavailable的更多相关文章

  1. -bash: fork: retry: Resource temporarily unavailable

    登陆不了服务器The server refused to start a shell. 登陆服务器后执行ls命令报错:   1 2 $ls -bash: fork: retry: Resource t ...

  2. 转connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    网站常出现502 bad gateway,程序没有问题. 根据nginx日志:connect() to unix:/var/run/php-fpm.sock failed (11: Resource ...

  3. 问题解决:bash: fork: retry: Resource temporarily unavailable

    linux报错: bash: fork: retry: Resource temporarily unavailable 不管是执行什么 登陆不了服务器The server refused to st ...

  4. connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    nginx + php做服务,在高并发的时候会出现一些错误  connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporar ...

  5. 近期编程问题——read:resource temporarily unavailable

    EAGAIN错误 出现问题:read:resource temporarily unavailable 原因:这种错误一般出现宰非阻塞的socket编程中,资源暂时不可用. 我的解决方法:囧,后来改成 ...

  6. [转] - linux下使用write\send发送数据报 EAGAIN : Resource temporarily unavailable 错

    linux下使用write\send发送数据报 EAGAIN : Resource temporarily unavailable 错 首先是我把套接字设置为异步的了,然后在使用write发送数据时采 ...

  7. Resource temporarily unavailable

    数据库版本:5.5.14 操作系统版本:contos 6.3 服务器256G内存,安装90个实例.通过脚本启动90个mysql数据库实例,会有几个实例无法启动,进程启动后直接被杀死.查看mysql日志 ...

  8. su: cannot set user id: Resource temporarily unavailable

    今天R&D所在主机出现su: cannot set user id: Resource temporarily unavailable资源不可用报错,直接通过其他机器ssh huyuh@xxx ...

  9. Resource temporarily unavailable用户的连接数设置的太小

    -bash:fork:Resource temporarily unavailable的问题   出现这个问题的原因是linux用户的连接数设置的太小,只要修改max user processes就可 ...

随机推荐

  1. oracle忘记密码,修改密码,解锁

    忘记密码修改密码: alter user system identified by values abc111; 修改后的用户名system,密码abc111. 解锁: cmd->输入 :sql ...

  2. PAT 1002 Hello World for U (20)

    Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. ...

  3. 无限层级且乱序的树形结构数据的整理,利用HashMap降低遍历次数

    我们在展示一个机构树的时候,经常会遇到这种一个问题,查询数据的时候,是从下往上查的,但展示数据的时候,又要从下往上展示. 这时候就要把查询到的数据进行整理从而得到我们想要的结构. 举个样例. ID P ...

  4. android HorizontalListView

    最近搞android 用到一个HorizontalListView 网上搜了一把.有一些国人实现的.但也有一些基本上是cp人家的开源项目. 本人找了两个.记录一下. 其一:https://github ...

  5. IIS Web服务扩展中添加ASP.NET4.0

    问题 服务器上安装了ASP.NET 4.0.30319组件,但是在IIS的Web服务扩展中并没有找到ASP.NET v4.0.30319这项,这导致基于.NET4.0开发的网页都无法正常浏览(404错 ...

  6. Dropbox + Farbox高速创建免费博客小站

    创建自己的Dropbox账号(已有账号的略过) 注冊地址:Dropbox 点击链接注冊就好了,so easy: 账号注冊成功后,能够选择下载同步client(windows.Mac.ios.andro ...

  7. hdu1298 T9(手机输入法,每按一个数字,找出出现频率最高的字串,字典树+DFS)

    Problem Description A while ago it was quite cumbersome to create a message for the Short Message Se ...

  8. 关于在打包Jar文件时遇到的资源路径问题(一)

    当我们将程序写好,并进行打包成Jar文件时,通常都带有各种资源,这些资源可以是图像或者声音文件,也可以是别的如文本文件或二进制文件等,这些资源都和代码密切相关.例如在一个JPanel类上显示一些可能变 ...

  9. Python unittest 官方文档

    https://docs.python.org/2/library/unittest.html#

  10. Maven插件之portable-config-maven-plugin(不同环境打包)

    在大型的项目组中,分不同的开发环境,测试环境,生产环境(说白了就是配置文件不同,或者数据源,或者服务器,或者数据库等);问题来了,如何使用Maven针对不同的环境来打包呢? Maven提供了Profi ...