mount error(12): Cannot allocate memory解决办法

http://hi.baidu.com/zhangbin101004/item/e459f4d1f818dfbd33db903b

 

今天囧了啊,在ubuntu挂载的文件夹里面解压数据库,结果linux嫌太大挂掉了直接mount error(12): Cannot allocate memory折腾了好久,终于发现解决办法:

 

方法一:

------------------------------------------------------------------------------------------------------------------------------------------

http://blog.csdn.net/strategycn/article/details/7917082

当通过mount.cifs命令对windows下的文件进行映射时,若文件太大,便会产生这种错误,解决方法是:

   修改注册表 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\IRPStackSize项的值大于等于15,若IRPStackSize项不存在,就新建一个DWORD值,点击弹出窗口的的进制为十进制,值写个18就ok了,还要重启一下。

-------------------------------------------------------------------------------------------------------------------------------------------

 

 

--------------------------------------------------------detail-----------------------------------------------------------------------------------

http://linux.derkeiler.com/Newsgroups/comp.os.linux.networking/2006-10/msg00629.html

Check the Event Log on the Windows machine(

  1. 单击“开始”,然后单击“控制面板”。单击“性能和维护”,再单击“管理工具”,然后双击“计算机管理”。或者,打开包含事件查看器管理单元的 MMC。
  2. 在控制台树中,单击“事件查看器”。 

    应用程序日志、安全日志和系统日志显示在“事件查看器”窗口中。

) that fails to allow it's share 
to be mounted under System. Look for a red X, and the word Error. The 
Source is Srv. The error will be:

The server's configuration parameter "irpstacksize" is too small for the 
server to use a local device. Please increase the value of this 
parameter.

If you have this error on the Windows machine that fails to have it's 
share mounted, then do the following...

This key in the system registry must be modifed or created:(这个运行regedit)

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer
\Parameters\IRPStackSize

If the key is there, increase it a bit to say 15 or 18. If the key does 
not exist, as in my case, create a new DWORD Valute. Name it 
IRPStackSize. Double click on it to edit the value, put a check on the 
Decimal radio button for the Base so that you can see the parameter value 
as a decimal value and not a hexidecimal value. Give the new key a value 
of 15 and reboot. If that is not enough, raise it a litte to let's say 18 
and then reboot again. The problem is solved. Go mount your samba shares.

 

方法二

------------------------------------------------------------------------------------------------------------------------------------------

http://cplusplus2012.blog.163.com/blog/static/206676268201322054621392/

 

转载自: http://blog.chinaunix.net/uid-9185047-id-2973258.html 

If you mount a Windows 7 share using Samba/CIFS you may run into “mount error(12): Cannot allocate memory” if you are using very large files on the Windows machine. Looks like in certain situations Windows needs to be told to run as a file server and to expect large files. You can read more details at Large Files are locking up Windows 7 32 bit and 64 bit, but the solution is to make two registry edits and then restart a service:


Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
Restart the “server” service.

Once you have done that you should be able to mount the share using a command like “sudo mount -a” or just reboot the Linux machine.

 

这个问题太纠结了,有时挂载成功了,解压或者编译什么的,有时遇到Cannot allocate memory,就看不到你mount的目录,然后重启ubuntu还是没有,重新手动挂载就报这个错。 有时又没有,说不准这个问题的出现原因。 看来这个才明白。

------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------details-----------------------------------------------------------------------------------------

还有其他办法没有试过:祝大家好运!

http://jlcoady.net/windows/how-to-resolve-mount-error12-cannot-allocate-memory-windows-share

If you mount a Windows 7 share using Samba/CIFS you may run into “mount error(12): Cannot allocate memory” if you are using very large files on the Windows machine. Looks like in certain situations Windows needs to be told to run as a file server and to expect large files. You can read more details at Large Files are locking up Windows 7 32 bit and 64 bit, but the solution is to make two registry edits and then restart a service:

  1. Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
  2. Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
  3. Restart the “server” service.

Once you have done that you should be able to mount the share using a command like “sudo mount -a” or just reboot the Linux machine.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当出现"fork failed: cannot allocate memory"错误时,这通常表示系统内存不足以执行所需的操作。有几种方法可以解决这个问题。 首先,你可以通过运行"free -m"命令来查看系统内存的使用情况。关注"Mem"的"total"指标,表示总内存大小,"Used"表示已使用的内存,"buff/cache"表示缓存使用的内存,"swap"的"used"表示交换分区的使用情况。如果"swap"的"used"为0,表示未使用交换分区,这是正常情况。\[1\] 如果发现系统内存不足,你可以尝试创建一个swap分区来增加可用内存。可以按照以下步骤进行操作: 1. 运行"dd if=/dev/zero of=/var/swap.1 bs=1M count=1024"命令创建一个1GB大小的swap文件。 2. 运行"mkswap /var/swap.1"命令格式化swap文件。 3. 运行"swapon /var/swap.1"命令将swap分区挂载到文件系统中。\[2\] 创建swap分区后,再次运行"free -m"命令查看内存使用情况。然后尝试重新执行你的操作,例如"composer update"。 另外,如果问题是由于进程数过多导致的,你可以尝试修改最大进程数。可以按照以下步骤进行操作: 1. 运行"echo 1000000 > /proc/sys/kernel/pid_max"命令修改最大进程数。 2. 运行"echo 'kernel.pid_max=1000000' >> /etc/sysctl.conf"命令使修改永久生效。 3. 运行"sysctl -p"命令重新加载sysctl配置。\[3\] 这些方法应该能够解决"fork failed: cannot allocate memory"错误。如果问题仍然存在,请进一步检查系统资源使用情况,例如CPU和磁盘空间,并确保系统配置符合你的需求。 #### 引用[.reference_title] - *1* [centos7无法远程和登录,在线用户命令执行报错 fork failed :Cannot allocate memory](https://blog.csdn.net/edgar_t/article/details/107912328)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [安装composer后报错proc_open(): fork failed - Cannot allocate memory](https://blog.csdn.net/zhemejinnameyuanxc/article/details/90245502)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [fork failed: cannot allocate memory问题](https://blog.csdn.net/weixin_34112208/article/details/92394973)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值