lwp 模拟行锁堵塞 前端超时
来源:互联网 发布:淘宝店铺买家采集 编辑:程序博客网 时间:2024/06/08 13:02
jrhmpt01:/root/async# cat a2.pl use LWP::UserAgent;use utf8;use DBI;use POSIX;use HTTP::Date qw(time2iso str2time time2iso time2isoz);my $ua = LWP::UserAgent->new;$ua->timeout(10);$ua->env_proxy;$ua->agent("Mozilla/8.0");$time1=time2iso(time());print "\$time1 is $time1\n";my $response = $ua->get('http://120.55.118.6:3000/api/update?id=1');if ($response->is_success) {print $response->decoded_content; # or whatever}else{print $response->decoded_content; };$time2=time2iso(time());print "\$time2 is $time2\n";print "111111111111111111111111111111111111\n";jrhmpt01:/root/async# perl a2.pl $time1 is 2016-04-16 20:03:08500 read timeout$time2 is 2016-04-16 20:03:18111111111111111111111111111111111111查看接口的事务情况:get '/api/update' => sub {my $dbName = 'oadb';my $dbUser = 'query';my $dbUserPass = 'xxx';my $dbh = DBI->connect("dbi:Oracle:$dbName", $dbUser, $dbUserPass,{ RaiseError => 1, AutoCommit => 0 }) or die "can't connect to database " ; my $c = shift;my $id=$c->param('id');eval{$dbh->do("update query.test set id=100 where id =$id") or $!;$dbh->commit(); $c->render(text => "update successed" );};if( $@ ) { #warn "Database error: $DBI::errstr\n"; $dbh->rollback(); #just die if rollback is failing $c->render(text => "update failed" ); };};行锁堵塞,前端超时
0 0
- lwp 模拟行锁堵塞 前端超时
- perl lwp 超时问题
- C++ Socket为send recv设置堵塞超时时间
- 如何模拟Mysql超时
- charles模拟网络超时
- ORA-02049: 超时: 分布式事务处理等待锁模拟
- send/recv的超时模拟
- 模拟数据库连接池超时连接
- LWP安装
- Perl&LWP
- Perl & LWP
- LWP::Simple
- PERL LWP
- 模拟前端AFE
- 前端模拟点击
- 超级玛丽(简单模拟超时)
- Android Http请求网络模拟超时
- js超时调用模拟间歇调用
- 迁移sql server tempdb数据库
- 初学Qt——QTableView+QSqlqueryModel
- matlab时间格式转换
- Tesseract安装使用
- 【shell】基本操作,和常见的linux内建命令。
- lwp 模拟行锁堵塞 前端超时
- unicode和utf-8和assci之间的关系
- oracle 数据库,A 表有 10 条记录,以下查询可以查出几条? select * from A where rownum > 5
- Hibernate 主键生成策略
- 数据库基础及常用SQL语句
- js查看一个函数的执行所用时间
- 创建bus
- Resolving an unable to fork PHP warning in Windows
- 栈操作,构造,插入,删除,转换