Skip to content

Commit e20ac51

Browse files
committed
2 parents 0b32de7 + a551b5f commit e20ac51

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Countly [![Build Status](https://api.travis-ci.org/Countly/countly-server.png?branch=master)](https://travis-ci.org/Countly/countly-server) [![Install Countly on DigitalOcean](http://do.count.ly/button.svg?v2)](http://do.count.ly)
22

3-
**We're hiring:** Countly is looking for full stack node.js developers to work on its core platform. [Click this link for job description](https://count.ly/full-stack-node-js-developer/)
3+
**We're hiring:** Countly is looking for full stack node.js developers (from China and world, for remote work) to develop on Countly platform. [Click this link for job description](https://count.ly/full-stack-node-js-developer/)
44

55
**Are you a plugin developer?** [Contact us](http://count.ly/contact-us) if you like to work / working on a specific [plugin](http://count.ly/plugins) and we can discuss details on how we can work together in a lively environment!
66

plugins/push/api/parts/lib/connection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Cluster.prototype.send = function(messageId, content, encoding, expiry, device,
185185
};
186186

187187
Cluster.prototype.wow = function(){
188-
if (((this.queue.length + this.countAllConnections()) > DEFAULTS.queue) || this.profiler.cpu.value > DEFAULTS.profilerMaxCPU) {
188+
if (((this.queue.length + this.countAllConnections()) > DEFAULTS.queue) || (!this.profiler.closed && this.profiler.cpu.value > DEFAULTS.profilerMaxCPU)) {
189189
return 'such no power much sad';
190190
} else {
191191
return 'much happy so message';

plugins/push/api/parts/lib/constants.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ exports = module.exports = {
7979
/** Allow transmitAtOnce to change until eventLoopDelayToThrottleDown is met */
8080
transmitAtOnceAdjusts: true,
8181
/** If adjusts, for how much tops (HTTP/2 streams) */
82-
transmitAtOnceMaxAdjusted: 400,
82+
transmitAtOnceMaxAdjusted: 300,
8383
/** How much simultaneous requests can be in processing */
84-
maxRequestsInFlight: 899,
84+
maxRequestsInFlight: 699,
8585
/** How much certificates to hold in memory instead of reading from file */
8686
certificatesCache: 50,
8787
/** Keep no more than 50000 messages per connection in memory. Whenever sending is slower than messages stream,

plugins/push/api/parts/lib/http.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ HTTP.prototype.waitAndClose = function(clb) {
174174
if (this.notesInFlight <= 0 || this.closeAttempts > 30) {
175175
this.closeAttempts = 100;
176176

177-
log.d('Wating 10 seconds before closing connection (%d notes in flight, %d in queue)', this.notesInFlight, this.notifications.length);
177+
log.d('Wating 50 seconds before closing connection (%d notes in flight, %d in queue)', this.notesInFlight, this.notifications.length);
178178
setTimeout(() => {
179179
log.d('Finally closing this connection (%d notes in flight, %d in queue)', this.notesInFlight, this.notifications.length);
180180
if (this.socket) {
@@ -200,7 +200,7 @@ HTTP.prototype.waitAndClose = function(clb) {
200200
setTimeout(clb.bind(null, arr.length ? arr : undefined), 10);
201201
}
202202
this.emit(EVENTS.CLOSED);
203-
}, 10000);
203+
}, 50000);
204204
} else {
205205
log.d('Not emiting closed event yet - %d notes are in flight, %d in queue', this.notesInFlight, this.notifications.length);
206206
this.closeAttempts = this.closeAttempts ? ++this.closeAttempts : 1;

0 commit comments

Comments
 (0)