首页 \ 问答 \ SPDY多路复用使请求比HTTP慢(SPDY multiplexing makes requests slower than HTTP)

SPDY多路复用使请求比HTTP慢(SPDY multiplexing makes requests slower than HTTP)

我有一个应用程序混合网络请求,一些小项目(~20kB)和一些大项目(> 2mB)。 如果我对SPDY的理解是正确的,则SPDY会在同一连接上复用请求,因此如果较小的请求落后于较大的请求,则可能会减慢这些请求的速度。 由于OkHttp还不支持请求的优先级,我能做些什么来防止这种情况?

我尝试使用OkHttp客户端来处理小请求,并尝试使用另一个OkHttp客户端来处理更大的请求,但这似乎无法解决问题,因为连接似乎是在客户端之间共享的。


I have an application that makes a mixture of network requests, some small items (~20kB) and some large items (>2mB). If my understanding of SPDY is correct, SPDY multiplexes requests on the same connection, so the smaller requests could potentially be slowed down if they're behind the larger requests. Since OkHttp doesn't support prioritization of requests yet, is there anything I can do to prevent this situation?

I tried using an OkHttp client for the small requests and another OkHttp client for the larger requests but this doesn't seem to solve the problem since the connections seem to be shared across clients.


原文:https://stackoverflow.com/questions/28779383
更新时间:2023-06-17 18:06

最满意答案

运行cron时,环境设置不同。 cron使用的PATH很可能找不到bzip2程序。

crontab不起作用的原因


The environment is set up differently when you run cron. It is quite possible that the PATH used by cron does not find the bzip2 program.

Reasons why crontab does not work

相关问答

更多
  • Cron看起来不错,但是找不到.py文件的路径。 你将不得不添加一个路径或家庭像: location=/home/bitnami/ python $location/some_script.py 还需要正确定位s3cmd: /bin/s3cmd 替代方案可能还需要在执行脚本之前首先加载用户环境,以查找s3cmd的用户名/密码/ ssh密钥 Cron looks OK, however your path to the .py file will not be found. You will have t ...
  • 在将来使用一个表达方式 使用org.quartz.CronExpression一些快速测试。 String exp = "0 0 0 1 1 ? 3000"; boolean valid = CronExpression.isValidExpression(exp); System.out.println(valid); if (valid) { CronExpression cronExpression = new CronExpression(exp); System.out.print ...
  • 你可以试试 30 12 * * * python /home/pi/Python/Email.py 或更改文件的权限: chmod +x /home/pi/Python/Email.py You could try 30 12 * * * python /home/pi/Python/Email.py or change permission of your file: chmod +x /home/pi/Python/Email.py
  • 运行cron时,环境设置不同。 cron使用的PATH很可能找不到bzip2程序。 crontab不起作用的原因 The environment is set up differently when you run cron. It is quite possible that the PATH used by cron does not find the bzip2 program. Reasons why crontab does not work
  • 有许多带有crons的问题......在没有MTA的情况下,请查看输出更简单的方法 - 尝试将其连接到文件: */1 * * * * /home/pi/ipsender.py > /home/pi/ipsender.log 2>&1 使用print 'starting'启动你的python文件,看看python文件是否开始执行ok。 There are lots of gotchas with crons... In the absence of the MTA, see the output an ea ...
  • wget的 基于php的cronjob在某些方面我遇到了同样的问题。 问题是,wget本身可以超时。 如果达到此超时,wget将一次又一次地尝试。 尝试使用一些wget选项以确保它按照您希望的运行方式运行。 例: wget -O /dev/null --tries=1 --timeout=600 'https://mywebsite.com/script.php' --tries表示如果出现超时,它将尝试执行多少次。 --timeout指定max exec。 时间以秒为单位。 这些选项也可以在cronjo ...
  • 初步 检查在crontab中SHELL和PATH的值是否设置正确,例如: SHELL=/bin/bash PATH=/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/local/sbin:/usr/sbin 确保真正使用了预期的外壳(例如bash)。 确保所有需要的二进制文件都可以通过PATH来访问。 检查你在crontab中没有未转义的% 。 有关详细信息,请参阅man 5 crontab 。 也许你也将环境变量MAILTO设置为认可值,例如: MAILTO="w ...
  • 你的$PATH很好; 不要管它。 在Ubuntu上,您调用的所有命令( touch , chmod , curl )都在/bin和/或/usr/bin 。 你是怎么设立cron工作的? 你是否以crontab some-file身份运行crontab some-file ? 似乎/etc/crontab是以root身份运行cron命令的常用机制。 在我的Ubuntu系统上, sudo crontab -l表示no crontab for root 。 以root身份运行crontab ,就像对任何非root ...
  • 这不是一个重击问题; 你的curl命令仍然在运行,所以bash仍在运行,等待curl关闭bash shell正在读取的管道。 要解决你的curl调用问题,我会首先运行它而不用bash管道来检查我是否得到了我预期的输出。 This is not a bash problem; your curl command is still running so bash is still running, waiting for curl to close the pipe that the bash shell is ...
  • 在你的问题中,你正在运行的cron就像 2 * * * * . $HOME/.bash_profile ~/jek.sh 您需要使用此条目更正/验证多项内容 检查两者的文件权限是777还是775 ( rwx )。 如果没有,则使用chmod 777 ~/jek.sh更改文件权限 检查他们每个人在他们的shebang行中定义他们是哪个语言脚本( #!/usr/local/env sh ) 用&&或;分隔两个脚本 这样它们都能正常运行。 目前,第二个脚本的名称将被视为第一个脚本的参数。 有一个. 在2 * * ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。