UnknownError: session deleted because of page crash from tab crashed
一、问题
在docker上跑Selenium+ChromeDriver+Chrome无头模式报错:
UnknownError: unknown error: session deleted because of page crash
from tab crashed
(Session info: chrome=43.0.2357.81)
(Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Linux 3.13.0-32-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 53 milliseconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'zelenium', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-32-generic', java.version: '1.7.0_80'
Session ID: b12eb3c43351dad58746798c40078ef9
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/tmp/.com.google.Chrome.11yHIh}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=43.0.2357.81, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
二、分析
/dev/shm太小了,要扩容
三、解决方案
3.1 如果环境是Kubernetes(k8s)请参考:Kubernetes(k8s) docker 修改 /dev/shm大小
3.2 如何修改/dev/shm大小?
/dev/shm在/etc/fstab中挂载,对应tmpfs,实际使用的是内存的空间。默认情况下,/dev/shm为物理内存大小的一半。因而,调整/dev/shm大小有两种方式:
加大Linux的物理内存
在/etc/fstab中明确指定/dev/shm的挂载sizes大小参数
[root@centos-fuwenchao mntsda3]# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 935M 228K 935M 1% /dev/shm
[root@centos-fuwenchao mntsda3]# vi /etc/fstab
2 #
3 # /etc/fstab
4 # Created by anaconda on Fri Nov 1 21:18:42 2013
5 #
6 # Accessible filesystems, by reference, are maintained under '/dev/disk'
7 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
8 #
9 UUID=8e319772-a274-4031-a53f-1178b3ab4de6 / ext4 defaults 1 1
10 UUID=ad4de750-9575-4040-a403-08c0642f0f2c swap swap defaults 0 0
11 tmpfs /dev/shm tmpfs defaults 0 0
12 devpts /dev/pts devpts gid=5,mode=620 0 0
13 sysfs /sys sysfs defaults 0 0
14 proc /proc proc defaults 0 0
[root@centos-fuwenchao mntsda3]# cp /etc/fstab /etc/fstab.20140218
[root@centos-fuwenchao mntsda3]# vi /etc/fstab
1
2 #
3 # /etc/fstab
4 # Created by anaconda on Fri Nov 1 21:18:42 2013
5 #
6 # Accessible filesystems, by reference, are maintained under '/dev/disk'
7 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
8 #
9 UUID=8e319772-a274-4031-a53f-1178b3ab4de6 / ext4 defaults 1 1
10 UUID=ad4de750-9575-4040-a403-08c0642f0f2c swap swap defaults 0 0
11 tmpfs /dev/shm tmpfs defaults,size=1024M 0 0
12 devpts /dev/pts devpts gid=5,mode=620 0 0
13 sysfs /sys sysfs defaults 0 0
14 proc /proc proc defaults 0 0
重新挂载
[root@centos-fuwenchao mntsda3]# mount -o remount /dev/shm
[root@centos-fuwenchao mntsda3]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.7G 4.6G 4.7G 50% /
tmpfs 1.0G 228K 1.0G 1% /dev/shm
/dev/sr0 4.1G 4.1G 0 100% /media/CentOS_6.4_Final
/dev/sda3 38G 176M 36G 1% /mnt/mntsda3
参考:
UnknownError: session deleted because of page crash from tab crashed的更多相关文章
- 2017.11.11 详谈application、session、request和page的作用范围
今天在图书馆遇到了问题 不知道怎么选择session还是request Web应用中的JSP和servlet都是由web服务器来调用,Jsp和Servlet之间通常不会相互调用,那么Jsp和Servl ...
- application、session、request、page的作用范围、Application,Session和Cookie的区别
Web应用中的JSP和servlet都是由web服务器来调用,Jsp和Servlet之间通常不会相互调用,那么Jsp和Servlet之间交换数据就要用到application.session.requ ...
- docker运行puppeteer出现Page crash解决方案
Docker默认文件空间64MB.如果puppeteer运行的时候超过这个内存就出现了.Page crash.可以使用docker run --shm-size=256m指定一个更大的内存即可.
- JSP的内置对象application、session、request、page的作用域
1.application内置对象的类型名称为ServletContext. 2.session内置对象的类型名称为HttpSession. 3.application作用域:对应整个应用上下文. a ...
- JSP内置对象--pageContent,request,response,session,application,config,out,page,exception
- 搭建谷歌浏览器无头模式抓取页面服务,laravel->php->python->docker !!!
背景: 公司管理系统需要获取企业微信页面的配置参数如企业名.logo.人数等信息并操作,来隐藏相关敏感信息并自定义简化企业号配置流程 第一版已经实现了扫码登录获取cookie,使用该cookie就能获 ...
- 非Page类使用session(Httpcontext.session和page.session区别)
ASP.NET中Session高级使用技巧 在开发Aspx .NET软件时,有时需要把常用的东西封装到一个非PAGE类中,文章介绍在非Page类中使用Session的方法. 一.PAGE参数法: 1. ...
- Design Doc: Session History for Out-of-Process iframes
Design Doc: Session History for Out-of-Process iframes Charlie Reis, May 2014 This document outlines ...
- strust2中使用session
在Struts2里,如果需要在Action中使用session,可以通过下面两种方式得到1.通过ActionContext class中的方法getSession得到2.Action实现org.apa ...
随机推荐
- Unity制作王者荣耀商业级手游
<王者荣耀>这种现象级手机游戏是如何制作出来的呢?本文以<王者荣耀>MOBO类型的多人在线战术竞技游戏为入口,覆盖Unity游戏制作开发前端与Node.js服务器端的开发必备知 ...
- Idea2019.2破解
1.在 hosts 文件里加入如下的配置:C:\WINDOWS\system32\drivers\etc\hosts 0.0.0.0 https://account.jetbrains.com:443 ...
- springIoC注解
一.通过注解注入Bean @Component:组件(spring扫描包下有该注解的类) @ComponentScan(包名):组件扫描(spring扫描该包名下的类) @Configuration: ...
- [root@offical nginx]# nginx -t nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1016001 in /usr/share/nginx/modules/mod-http-geoip.conf:1 nginx: con
[root@offical nginx]# nginx -tnginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_mo ...
- nginx中的超时配置
nginx.conf配置文件中timeout超时时间设置 client_header_timeout 语法 client_header_timeout time默认值 60s上下文 http serv ...
- 绕过WAF、安全狗知识整理
0x01 前言 目前市场上的WAF主要有以下几类 1. 以安全狗为代表的基于软件WAF 2. 百度加速乐.安全宝等部署在云端的WAF 3. 硬件WAF WAF的检测主要有三个阶段,我画了一张图进行说明 ...
- C++数据存储方式
1.栈,就是那些由编译器在需要的时候分配,在不需要的时候自动清楚的变量的存储区,里面的变量通常是局部变量.函数参数等. 2.堆,就是那些由new分配的内存块,他们的释放编译器不去管,由我们的应用程序去 ...
- LeetCode_349. Intersection of Two Arrays
349. Intersection of Two Arrays Easy Given two arrays, write a function to compute their intersectio ...
- HTTPS小结 、TSL、SSL
https://segmentfault.com/a/1190000009020635
- 【JS新手教程】JS获取当前星期几的几种方法
该文通过获取星期几的几种方法,介绍JS里的数组,判断,和字符串截取,可以当作新手教程看,小白也看的懂.获取星期几,可通过Date()对象的getDay()获取,获取的是一个数字,对应的是0,1,2,3 ...