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
最满意答案
运行cron时,环境设置不同。 cron使用的PATH很可能找不到bzip2程序。
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.
相关问答
更多-
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 ...
-
用Cron执行Python脚本(execute Python script with Cron)[2023-03-09]
你可以试试 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 ...
-
由Cron执行的Bash脚本中的PHP脚本序列未运行(Sequence of PHP Scripts in Bash script executed by Cron not running)[2022-05-31]
初步 检查在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 ... -
Cron工作没有开始(Cron job does not start)[2024-01-28]
你的$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不会执行ruby脚本(Cron won't execute ruby script)[2021-08-05]
在你的问题中,你正在运行的cron就像 2 * * * * . $HOME/.bash_profile ~/jek.sh 您需要使用此条目更正/验证多项内容 检查两者的文件权限是777还是775 ( rwx )。 如果没有,则使用chmod 777 ~/jek.sh更改文件权限 检查他们每个人在他们的shebang行中定义他们是哪个语言脚本( #!/usr/local/env sh ) 用&&或;分隔两个脚本 这样它们都能正常运行。 目前,第二个脚本的名称将被视为第一个脚本的参数。 有一个. 在2 * * ...