mysql 访问量过大,造成链接不上的情况 10C

mysql 访问量过大,造成链接不上的情况
硬件:16核心CPU ,32G内存,100M带宽
软件,php5.6,+mysql 5.7
用途,接口调用
mysql 基本配置:

  [client]
#password   = your_password
port        = 3306
socket      = /tmp/mysql.sock

[mysqld]
binlog_cache_size = 192K
thread_stack = 384K
join_buffer_size = 4096K
query_cache_type = 0
max_heap_table_size = 1024M
port        = 3306
socket      = /tmp/mysql.sock
datadir = /www/server/data
skip-external-locking
performance_schema_max_table_instances=400
table_definition_cache=400
key_buffer_size = 512M
max_allowed_packet = 100G
table_open_cache = 1024
sort_buffer_size = 2048K
net_buffer_length = 8K
read_buffer_size = 2048K
read_rnd_buffer_size = 1024K
myisam_sort_buffer_size = 64M
thread_cache_size = 192
query_cache_size = 0M
tmp_table_size = 1024M

explicit_defaults_for_timestamp = true
#skip-networking
skip-name-resolve
skip-grant-tables
max_connections = 2800
max_connect_errors = 100
open_files_limit = 65535
sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

#log-bin=mysql-bin
#binlog_format=mixed
server-id   = 1
expire_logs_days = 10
slow_query_log=1
slow-query-log-file=/www/server/data/mysql-slow.log
long_query_time=3
back_log = 900
#log_queries_not_using_indexes=on

#loose-innodb-trx=0
#loose-innodb-locks=0
#loose-innodb-lock-waits=0
#loose-innodb-cmp=0
#loose-innodb-cmp-per-index=0
#loose-innodb-cmp-per-index-reset=0
#loose-innodb-cmp-reset=0
#loose-innodb-cmpmem=0
#loose-innodb-cmpmem-reset=0
#loose-innodb-buffer-page=0
#loose-innodb-buffer-page-lru=0
#loose-innodb-buffer-pool-stats=0
#loose-innodb-metrics=0
#loose-innodb-ft-default-stopword=0
#loose-innodb-ft-inserted=0
#loose-innodb-ft-deleted=0
#loose-innodb-ft-being-deleted=0
#loose-innodb-ft-config=0
#loose-innodb-ft-index-cache=0
#loose-innodb-ft-index-table=0
#loose-innodb-sys-tables=0
#loose-innodb-sys-tablestats=0
#loose-innodb-sys-indexes=0
#loose-innodb-sys-columns=0
#loose-innodb-sys-fields=0
#loose-innodb-sys-foreign=0
#loose-innodb-sys-foreign-cols=0

default_storage_engine = InnoDB
innodb_data_home_dir = /www/server/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /www/server/data
innodb_buffer_pool_size = 1024M
innodb_log_file_size = 512M
innodb_log_buffer_size = 128M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 100
innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 16
innodb_write_io_threads = 16

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 4M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

一旦并发量有点大,可能会有一个查询阻塞,就会造成链接不上数据库或者php报错:
connect() to unix:/tmp/php-cgi-56.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client:
,问题应该在于数据库这边,数据库是独立的服务器,web有web的服务器,访问走的内网,不占用带宽。

1

6个回答

https://blog.csdn.net/jiedushi/article/details/6015262
MySQL高效处理大量并发的数据库连接方法

0

检查当时的数据库联接数量,是否已经达到你参数里设置的2800,如果已经达到,那么说明连接已经满了,想办法增加最大连接数量。
观察当时cpu 内存的使用量,看看是否因为cpu繁忙导致处理延时而连接不上。
日志里应该有一些信息可供参考。

0
zhangpan_soft
zhangpan_soft 回复qq_29339727: mysql好像最大连接数是3000吧?总之不是你设置多大就是多大,有个上限的,可能已经超过你的mysql本身最大上限,为什么不做读写分离和集群呢?
12 个月之前 回复
qq_29339727
背背山上的小和尚 恩,看到是连接数满了,但是我临时设置到10万,好像还是会报错,并且出现数据库连接不上的错误,CPU 和内存远远没有吃满,CPU 最高才占了30%,内存就更少了,25%
大约一年之前 回复

数据库的硬件配置挺好的,应该是企业生产环境下数据库配置。我谈一下我的思路首先上层应用应该是做了负载均衡会消耗很多连接还有其他的离线计算、定时任务等,所以我建议:
1、首先检查一下连接该数据库应用实例有哪些?每一个实例连接数有多少?这个很关键,一般来说公司规模变大,应用负载均衡添加,再加上离线计算统计分析,这些都会消耗数据库连接数,所以建议先排查一下应用。
2、如果应用连接数配置都正常,建议查找数据库的慢SQL,如果sql质量都很好,哪怕连接数很多也没什么大问题。
3、针对innodb的配置我感觉有些问题,建议去https://tools.percona.com/dashboard生成mysql配置,这样会好很多

0
qq_29339727
背背山上的小和尚 兄弟,这个生成的配置靠谱么
大约一年之前 回复

我贴一个8C16G机器的配置:

# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-28 generated for 1479338858@qq.com at 2017-08-25 12:21:13

[mysql]

# CLIENT #
port                           = 3306
socket                         = /abc/mysql.sock

[mysqld]

# GENERAL #
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /abc/mysql.sock
pid-file                       = /abc/mysql.pid

# MyISAM #
key-buffer-size                = 32M
myisam-recover                 = FORCE,BACKUP

# SAFETY #
max-allowed-packet             = 16M
max-connect-errors             = 1000000

# DATA STORAGE #
datadir                        = /abc/

# BINARY LOGGING #
log-bin                        = /abc/mysql-bin
expire-logs-days               = 14
sync-binlog                    = 1

# REPLICATION #
relay-log                      = /abc/relay-bin
slave-net-timeout              = 60

# CACHES AND LIMITS #
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
max-connections                = 500
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 4096
table-open-cache               = 4096

# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-log-file-size           = 256M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 12G

# LOGGING #
log-error                      = /abc/mysql-error.log
log-queries-not-using-indexes  = 1
slow-query-log                 = 1
slow-query-log-file            = /abc/mysql-slow.log

0
weixin_37893887
玄尺 回复qq_29339727: 这个配置是靠谱的,我们服务器一主三从,经过压测测试考验过的。但是生产环境的配置不是上面的配置,可以参考一下。你配置的innodb的缓存太小了,会影响查询性能
大约一年之前 回复
qq_29339727
背背山上的小和尚 最高一次性,能承受多大的压力?
大约一年之前 回复
qq_29339727
背背山上的小和尚 你的这个性能怎么样,并发量大的时候会不会出现问题?
大约一年之前 回复

设置下最大连接用户 希望帮你解决

0
qq_36546907
不忘初心方得始终小飞哥 回复qq_29339727: 设置了最大 还要看看io是否支持,考虑下io
大约一年之前 回复
qq_29339727
背背山上的小和尚 我设置过了,将最大连接数设置到10万,都不起作用
大约一年之前 回复

经过一轮测试:高并发的情况下,会造成数据库连接不上,

0
qq_29339727
背背山上的小和尚 回复weixin_37893887: 优化哪些方面呢
12 个月之前 回复
weixin_37893887
玄尺 这是很正常的情况,这说明数据库已经成为当前的瓶颈。两个建议:1、要求上层应用限流;2、数据库优化
12 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
mysql链接不上报错
Uncaught exception 'Exception' with message 'Connect failed: Can't connect to MySQL server on 'localhost' (10055)'。。。。。。。。
PHP链接不上MYSQL
今天看了很多的关于PHP链接不到MySQL的帖子,处理方法很多,复制dll文件到window文件夹的等等,都没有解决我的问题,后来发现把前几天装的Zend卸载后就可以了,一切回复了。现在贴出来希望同类问题的朋友少走弯路。just this 。
C#链接mysql链接不上
public static string connectionString = "Data Source=127.0.0.1; Initial Catalog=userdb; User ID=root; Password=123456; Max Pool Size=75; Min Pool Size=5; MultipleActiveResultSets=true";rnrnrnrn public IQueryable FindAll()rn rn rn DataContext db = new DataContext(sqlConns);rn rn IQueryable users = db.GetTable();rn return users;rn rn [img=https://img-bbs.csdn.net/upload/201403/06/1394083386_702623.png][/img]rnrnrn提示错误为:rn在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接)[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/1.gif][/img]求解求解
mysql 左连接 右连接
内连接(INNER JOIN)(典型的连接运算,使用像   =   或   左连接(LEFT   JOIN   或   LEFT   OUTER   JOIN)是右左边表中的数据为基准,若左表有数据右表没有数据,否则显示左表中的数据右表中的数据显示为空  右连接(RIGHT  JOIN  或  RIGHT   OUTER   JOIN)是以右边表中的数据为基准,若右表有数据左表没
NAVICAT 链接不上远程服务器里的MYSQL~~!!
首先声明,配置MYSQL权限那个已经试过了,没用的,还有其他原因没。rnrnrn2003 - Cann't connet to Mysql server on 'XXX.XXX.XXX.XXX' (10060)rnrn这个错误
解决MySQL链接不上问题
今天链接MySQL时出现如下问题: Host 'localhost' is not allowed to connect to this MySql server 在网上找到了解决办法,在这里整理下,方便以后使用。 1、使用管理员打开命令窗口,输入如下命令: 停止mysql服务:sc stop mysql 输入:mysqld --skip-grant-tables
怎样解决访问量过大的问题?
基本上访问人数超过200服务器就快死翘翘了rniis是不是有连接数限制?rnSQL Server的连接数也不可能是无限的啊rn怎么才能承受那种几千人的访问量啊?
链接不上小米手机
http://www.cnblogs.com/lucky-tom/p/3449700.html
Postgresql链接不上
postgresql链接报错: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (...
数据库服务器链接不上
Web服务器和数据库服务器,分别在两台HP的服务器上,数据库为SQL server2000.但是数据库服务器老是连不上,报SQL server不存在或者拒绝访问.在Web服务器上通过SQL server控制台注册一个数据库服务器上的数据库,能够正常访问,但是系统(一个web应用系统)访问不了数据库,使用本机数据库能正常运行,使用其他PC作为数据库服务器也能正常运行,请问大家有哪些方面的问题.
linux上java项目链接不上mysql,本地测试无问题
错误部分信息: at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnectio java项目在win7上可以正常运行,部署到linux上启动不了错误部分截图如下: 排错的方式: 在错误中查看并无找不到mysql jar包问题,故分析认为c3p0出了问题,一直在c3p0上排错,浪费了一定的时间。
mysql 不走索引的情况
1 or (待确认)、in(待确认) 2 like '%abc' 或者 like‘%abc%’ 3 where num/2=100 或者 subString(a,1,3)='ab' 4 where id !=2 或者 where id <> 2 5 where name is null 6 复合索引a-b-c,a用到,b用不到,c用不到,ab有效,ba有效,a or b无效,...
Xshell 6链接Liunx链接不上:
在Liunx安装没有出现问题的情况下有2种可能; 1.ssh服务没有打开或者未安装,我们需要确保ssh服务是开启的, 解决方法: $ sudo ps -e | grep ssh -> 检查ssh服务是否启动,若结果是: 则说明ssh服务已启动,若不是这个结果,则说明ssh服务未启动 $ sudo service ssh start -> 启动s...
php5.20链接sqlsever2000经常出现链接不上?
我的系统是window2003+apache2.23+php5.20+sqlserver2000,以前机器比较稳定,最近这段时间,经常出现mssql_pconnect() [function.mssql-pconnect]: Unable to connect to server: ...,有时有没有问题,这是怎么回事?
LinkedServer链接Windows2003的SQLServer链接不上??
--创建链接服务器rnexec sp_addlinkedserver '链接名','','SQLOLEDB','远程服务器名或ip地址'rnexec sp_addlinkedsrvlogin '链接名','false',null,'用户名','密码'rngornrnselect * from 链接名.pubs.dbo.syhsobjectsrnrn上面在链接windows2000时没有问题,但不能连接Windows2003的SQLServerrn
mssql_connect链接不上mssql
奇怪了~为什么我用com可以连接数据库~用mssql_connect就总是失败呢?rn$conn = @new COM("ADODB.Connection");rn$connstr = "Provider=sqloledb;Data Source=localhost;Initial Catalog=a04;user id=sa;password=helloyouyuan;";rn$conn->Open($connstr);rn连接成功rnrn$conn=mssql_connect("localhost","sa","helloyouyuan") or die("连接失败")rn显示"连接失败"
yii链接数据库链接不上????
yii给服务器部署时、不能获取数据库信息、凡是和controller有交互的地方都不能执行!求大侠!!![img=https://img-bbs.csdn.net/upload/201405/21/1400679304_207365.png][/img]
springboot链接mysql长时间不访问后报错怎么办
[img=https://img-bbs.csdn.net/upload/201804/08/1523170482_623175.png][/img]
rabbitMQ 本地链接不上
![图片说明](https://img-ask.csdn.net/upload/201811/06/1541475689_666339.jpg)![图片说明](https://img-ask.csdn.net/upload/201811/06/1541475701_121209.jpg)![图片说明](https://img-ask.csdn.net/upload/201811/06/1541475708_511146.jpg)![图片说明](https://img-ask.csdn.net/upload/201811/06/1541475716_63305.jpg)![图片说明](https://img-ask.csdn.net/upload/201811/06/1541475724_426225.jpg)rn 大佬帮帮忙 微笑~
数据库怎么链接不上?
Private Sub Command1_Click()rnDim find_str As StringrnDim cnn2 As ADODB.ConnectionrnDim rssearch As ADODB.RecordsetrnrnIf Text1.Text = Empty Thenrn MsgBox "请输入查询内容", , "查询"rn Text1.SetFocusrn End Ifrn find_str = "select * from 客房预定 " & _rn "where 客人名称='" & Trim(Text1.Text) & "';"rn Set cnn2 = New ADODB.Connectionrn cnn2.ConnectionString = "provider=MICROSOFT.Jet.OLEDB.3.51;" & _rn "data source=d:\2\db1.mdb;"rn cnn2.Open (这个地方停住,说是找不到数据源d:\2\db1.mdb")rn Set rssearch = New ADODB.Recordsetrn rssearch.Open Text1, cnn2, adOpenDynamicrn请大侠指教,多谢
QCheckBox信号槽,链接不上
QCheckBox *checkBox1 = new QCheckBox(tr("123"),this);rnrnconnect(checkBox1, SIGNAL(stateChanged(int state)), this, SLOT(slotStateChanged(int state))); 不对rnrnconnect(checkBox1, SIGNAL(toggled(bool b)), this, SLOT(slotStateChanged(bool b))); 不对rnrn求正解!
数据库 链接不上 急!
[color=#800080]rn我配置的 DB Browser jdbc:sqlserver://PC-201011232144\SQLEXPRESS;databaseName=Shoppingrn或者:rnjdbc:sqlserver://localhost:1433;databaseName=Shopping rnSSH2 就只要 一个 链接地址。 和 JDBC 驱动。 链接地址 我写出来了 驱动 我也有啊。rn但是 测试 链接 能 链接 上 。 只要请求 数据 就 不能链接 到了 为什么啊?rn报错信息:rn rnorg.hibernate.exception.GenericJDBCException: Cannot open connectionrnat org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)rnat org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)rnat org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)rnat org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)rnat org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)rnat org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)rnat org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)rnat org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577)rnat org.hibernate.loader.Loader.doQuery(Loader.java:696)rnat org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)rnat org.hibernate.loader.Loader.doList(Loader.java:2232)rnat org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)rnat org.hibernate.loader.Loader.list(Loader.java:2124)rnat org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)rnat org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)rnat org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)rnat org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)rnat org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)rnat com.babasport.dao.impl.BuyerDaoImpl$1.doInHibernate(BuyerDaoImpl.java:47)rnat org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)rnat org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)rnat com.babasport.dao.impl.BuyerDaoImpl.login(BuyerDaoImpl.java:37)rnat com.babasport.biz.impl.BuyerBizImpl.login(BuyerBizImpl.java:26)rnat com.babasport.action.BuyerAction.login(BuyerAction.java:38)rnat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rnat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rnat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rnat java.lang.reflect.Method.invoke(Method.java:597)rnat com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rnat com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rnat com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rnat org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rnat com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rnat com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rnat org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rnat org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rnat org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rnat org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rnat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rnat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rnat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rnat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rnat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rnat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rnat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rnat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rnat org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rnat org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rnat org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rnat java.lang.Thread.run(Thread.java:619)rnCaused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (到指定实例 的连接失败。错误: java.net.SocketTimeoutException: Receive timed out。)rnat org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)rnat org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)rnat org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)rnat org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)rn... 84 morernCaused by: com.microsoft.sqlserver.jdbc.SQLServerException: 到指定实例 的连接失败。错误: java.net.SocketTimeoutException: Receive timed out。rnat com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)rnat com.microsoft.sqlserver.jdbc.SQLServerConnection.getInstancePort(Unknown Source)rnat com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)rnat com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)rnat org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)rnat org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)rnat org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)rnat org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)rn... 87 morern[/color]
数据库远程链接不上
问题描述:服务器上自己通过127.0.0.1和自己的ip地址均可以访问到,但是本地计算机却连接不上。经过多方查找,原来是防火墙问题导致的。将端口1433加入入站规则中即可。...
SSRS Server 链接不上!!!!
当我配置了Reporting Service,在本地链接服务的时候,发现链接不上:具体问题如下:(Reporting ServiceS也已经配置好了的,没有发现明确的问题)rn[img=https://img-bbs.csdn.net/upload/201312/23/1387795662_321428.png][/img]rn[img=https://img-bbs.csdn.net/upload/201312/23/1387795675_267237.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201312/23/1387795684_916894.png][/img]rnrn另外SQL的服务都是打开的。SSIS 的服务是可以链接上的。但是不知道为什么本地的SSRS打不开。IE 的打开方式也是用管理员的方式打开的,应该有可能是其他权限的问题,但是我解决不了,希望大神解答啊。谢谢!!!
servlet链接不上mssql
我用tomcat5.0系统是2000sp4 3个jar也拷到D:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\lib下面了。rn但是链接报错。。tomcat控制台输出:java.sql.SQLException: No suitable driverrn以下是我得链接代码:rnpublic void connectDB()rn try rn Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();rn catch(Exception e) rn rn rnrn String url="jdbc:microsoft:sqlserver;DatabaseName=iblog"; rn String user=""; rn String password=""; rn tryrnrn Connection conn= DriverManager.getConnection(url,user,password);rn Statement stat = conn.createStatement();rn ResultSet rs = stat.executeQuery("INSERT account (accountID,userName,passWord,eMail,firstName,lastName,age,career) VALUES ('id','name','psw','email','firstName','lastName','age','career')"); rn catch(Exception e)rn System.out.println(e);rn rnrnrnrn解决立刻结贴
系统突然链接不上
2015-9-16 13:50:36 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the j
socket服务器端链接不上。。。
书上有个例子,上面讲了如何用python的socket建立一个服务器端和客户端,然后相互通信的例子rn我系统是ubuntukylin14.04,网通50Mb网络,所有防火墙全部关闭(我能关的都关了,但不排除有漏掉的选项)rn服务器端代码 TCPServe.pyrn[code=python]#/usr/bin/env pythonrnimport socketrnimport timernHostName = ""rnHostCode = 65535rnHostInfo = (HostName,HostCode)rnBuffer = 1024rnST = socket.socket(socket.AF_INET,socket.SOCK_STREAM)rnST.bind(HostInfo)rnST.listen(5)rnwhile True:rn print "Waiting For Connection...."rn TCPHost,addr = ST.accept() #connectrn print "...Connect From %s"%addr rnrn while True:rn Datas = TCPHost.recv(Buffer)rn if Datas == None:rn breakrn Datas = time.ctime() + Datasrn TCPHost.send(Datas)rn TCPHost.close()rnST.close()[/code]rn然后我先运行了下这个脚本rn结果是rnWaiting For Connection....rn然后就么有了。。。。我只能用ctrl+c强制关闭他,然后我看代码,我估计是accept()函数出了问题,所以我加了异常代码,想看看到底是什么情况,于是脚本变成了rn[code=python]#/usr/bin/env pythonrnimport socketrnimport timernHostName = ""rnHostCode = 65535rnHostInfo = (HostName,HostCode)rnBuffer = 1024rnST = socket.socket(socket.AF_INET,socket.SOCK_STREAM)rnST.bind(HostInfo)rnST.listen(5)rnwhile True:rn print "Waiting For Connection...."rn try:rn TCPHost,addr = ST.accept() #connectrn except Exception , e:rn print ern else: rn print "...Connect From %s"%addr rnrn while True:rn Datas = TCPHost.recv(Buffer)rn if Datas == None:rn breakrn Datas = time.ctime() + Datasrn TCPHost.send(Datas)rn TCPHost.close()rnST.close()[/code]rn我本以为accept()出现问题会有些异常提示,方便问题排查,但运行脚本结果还是rnWaiting For Connection....rn没有其他任何信息。。。。rn遇到这种情况怎么处理
链接数据库不上怎么办?
各位:rn 我在链接数据库时,在自以为没有错的情况下,浏览器却反回信息提示面代码的最后一列可能有问题:rnSet conn=Server.CreateObject("ADODB.Connection")rnDBPath=Server.MapPath("gtbook.mdb")rnconn.Open"driver=Microsoft Access Driver(*.mdb);dbq=" & DBPathrnrn请问哪里出错了?rnrn
链接不上 FlatSB_SetScrollPos 的问题
mingw32-makern==== Building test ====rnapp.cpprnmain.cpprnLinking testrnobj/Debug/main.o: In function `ZN7DlgMain8InitListEP6HWND__':rnd:/develop/C-C++/listview/main.cpp:171: undefined reference to `FlatSB_SetScrollPos@16'rncollect2: ld returned 1 exit statusrnmingw32-make[1]: *** [debug/exeName.exe] Error 1rnmingw32-make: *** [test] Error 2rnrn我用的是 MinGW5.1.4rn求解,谢谢
连接不上MySQL!!!!!!!!!
我的操作系统是WINDOWS 2K P,WEB服务器是APACHE+PHP+MySQL。以前使用一切正常,可是最近用APACHE调用PHP却连接不上MySQL服务器了,而用MySQL自带的客户端软件(mysql.exe)却可以正常使用,请问各位大虾如何解决???
MySQL连接不上
电脑还原后重装MySQL,重装时步骤可能和以前不太一样(端口变成了8089),数据库安装算是成功吧,MySQL数据库显示正常。但用以前的程序改端口连接不上了,不知什么原因,希望各路高手为我解题。rn[code=Java]The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2209)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:776)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284)rn at java.sql.DriverManager.getConnection(DriverManager.java:582)rn at java.sql.DriverManager.getConnection(DriverManager.java:154)rn at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)rn at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)rn at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)rn at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)rn at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)rn at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)rn ... 26 morernCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure[/code]
mysql连接不上
mysql连接不上,日志中的错误信息:Can't open and lock privilege tables: Table 'mysql.host' doesn't exist,网上查了下可以将老的数据权限表复制到当前的数据目录,不过老的被删除了啊,请教各位有还有什么办法么,难道只能重装了?
MYsql装不上
昨天重装了windows7后MYsql就装不上了,装到后面apply security settings不成功,说是ERROR 2013.我换过端口,也重装过没办法。求高手解决!~
mysql登不上
我装完Mysql,进MySQL Command Line Client刚输入密码一回车就出现Connection error 2013: Lost connection to MySQL server during query。闪一下就没了。这应该是错误日志:rnInnoDB: The first specified data file .\ibdata1 did not exist:rnInnoDB: a new database to be created!rn100309 16:28:43 InnoDB: Setting file .\ibdata1 size to 10 MBrnInnoDB: Database physically writes the file full: wait...rn100309 16:28:43 InnoDB: Log file .\ib_logfile0 did not exist: new to be createdrnInnoDB: Setting log file .\ib_logfile0 size to 10 MBrnInnoDB: Database physically writes the file full: wait...rn100309 16:28:44 InnoDB: Log file .\ib_logfile1 did not exist: new to be createdrnInnoDB: Setting log file .\ib_logfile1 size to 10 MBrnInnoDB: Database physically writes the file full: wait...rnInnoDB: Doublewrite buffer not found: creating newrnInnoDB: Doublewrite buffer createdrnInnoDB: Creating foreign key constraint system tablesrnInnoDB: Foreign key constraint system tables createdrn100309 16:28:44 InnoDB: Started; log sequence number 0 0rn100309 16:28:44 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.rnVersion: '5.0.22-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)rn很头疼,装了几次都这样。有什么好办法?
mysql 连接不上?
我的mysql 为什么连接不上呀?rn是我连本机器 本机IP:192。168。1。54rn user:rootrn pwd:空rn rn它提示我的错误代码1130:连接数据库失败,没有连接数据库的权限rn这是为什么呀?
连接不上MySql
用管理员身份运行PowerShell bash sudo service mysql status, 可以看到服务器状态已停止 sudo service mysql start
连接不上mysql
[root bin]#./mysqlrnERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
mysql 远程登陆不上
当使用 TCP/IP 连接 mysql 时, 出现 : Can’t connect to MySQL server on ‘xxx.xxx.xxx.xxx.’(111)这个错误。经过反复折腾: 确定IP没错,用户权限是有的(支持远程IP连接),配置文件以注销 绑定本地IP选项。。。 浪费了半小时之后。。。看到以段话,,,如果是在linux shell命令行中直接打 mysql 命令,能够顺利连
mysql数据库连接不上?
private String sDBDriver = "org.gjt.mm.mysql.Driverrnprivate String sConnStr = "jdbc:mysql://localhost:3306/mytest?user=root&password=system";rnClass.forName(sDBDriver);rnconn=DriverManager.getConnection(sConnStr);rnrn提示错误:rnjava.lang.NullPointerExceptionrn at newsgroup.MysqlConnect.main(MysqlConnect.java:146)rnDBConnect():Communication failure during handshake. Is there a server running on localhost:3306?rnException in thread "main" rnrn我用mysql的客户端连接数据正常。rn但是查一下,3306的端口绑定的IP是0.0.0.0,这是为什么,如何解决?rnrn
mysql 远程连接不上,由于bind-address引起10061错误的情况
Linux服务器中安装了mysql数据库,在window系统中安装了mysql-workbench程序,需要连接数据库登录的时候遇到连接失败这里进行总结一下。     can't connect to mysql server on ‘ip地址’ 10061错误,本人开始的时候并没有发现这个办法的解决方法,后来经过多番查找外加百度发现这个问题的解决方法当然网上现在也有这个解决的方