How to set resource limit for fe of starrocks? - starrocks

I found that the be process in starrock can set the resource limit by mem_limit. But did not find out the relative configuration in configuration for fe in starrocks? Anyone knows that?

Related

failed to stat sieve storage path: nonsense path

I have a mail server with postfix and dovecot installed. Postfix is configured to use dovecot's lmtp service in order to apply some sieve scripts.
mailbox_transport = lmtp:unix:private/dovecot-lmtp
And this seems to work so far. But when my server receives a mail to the account ilka (the same with all other accounts), I get this misterious error in the mail.log:
dovecot: lmtp(ilka): Error: wFYTAsmc7lvCLgAAinrl1Q: sieve: file storage: Failed to stat sieve storage path: stat(/var/mail//ilka/sieve/scripts/) failed: Not a directory
In dovecot's conf.d/90-sieve.conf I actually statet
sieve = file:~/sieve;active=~/.dovecot.sieve
So how does dovecot come up with this weird (and invalid) file path including two slashes? I am sure, I must have done some kind of very stupid misconfiguration, but I don't know where...
Thank you for your help!
Regards,
Ilka
OK, I am just stupid:
I mixed up a few tutorials and did not keep track of which config files I changed. In dovecot.conf I overwrote the sieve configuration with this nonsense:
plugin {
sieve_before = /var/mail/sieve/spam-global.sieve
sieve_dir = /var/mail/%d/%n/sieve/scripts/
sieve = /var/mail/%d/%n/sieve/active-script.sieve
}
I commented it out, now my mail server works fine and I can start to write some sieve rules.
The actual configuration, of course, is in
/etc/dovecot/conf.d/90-sieve.conf
making the default configuration for the location of the users' sieve script files:
sieve = file:~/sieve;active=~/.dovecot.sieve
Maybe someone will find this useful to learn from my mistake in the future.
Regards,
Ilka

How select prefered file transport method?

I have a problem, as I think, with my prosody configuration. When I am sending files (for example photos) more the ~2 or 3 megabytes (as I established experimentally) using Converstions 2.* version (android IM app) it transfers this files using peer to peer connection instead of uploading this file to server and sending a link to my interlocutor. Small files transfers well using http upload. And I couldn't find a reason for such behavior.
Here are some lines for http_upload module from my config, that I took from official documentation (where I hadn't found a setup for turning off peer to peer files transfer):
http_upload_file_size_limit = 536870912 -- 512 MB in bytes
http_upload_expire_after = 604800 -- 60 * 60 * 24 * 7
http_upload_quota = 10737418240 -- 10 GB
http_upload_path = "/var/lib/prosody"
And this is my full config: https://pastebin.com/V6DNYrhe
Small files are transferred well using http upload. And I couldn't
find a reason for such behavior.
TL;DR: You put options in the wrong place. The default 1MB limit
applies. This is advertised to clients so they know about it and can use
more efficient p2p transfer methods for very large files.
http_upload_path = "/var/lib/prosody"
This line makes Prosodys data directory public, allowing anyone easy
access to all user data. You really don't want to do that. You are
lucky you did not put that in the correct section.
And this is my full config: https://pastebin.com/V6DNYrhe
"http_upload" is in the global modules_enabled list which will load
it onto all VirtualHost(s).
You have added options to the end of the config file, putting them under
a Component section. That makes those options only apply to that
Component.
Thus, the VirtualHost where mod_http_upload is loaded sees no options
set and will use the defaults.
http_upload_file_size_limit = 536870912 -- 512 MB in bytes
Don't do this. Prosodys built-in HTTP server is not optimized for very
large uploads. There is a safety limit on HTTP request size that will
cap HTTP upload size limit to 10M to prevent DoS attacks.
While that limit can be changed, I would strongly suggest you look at
https://modules.prosody.im/mod_http_upload_external.html instead.

Play 2.6, URI length exceeds the configured limit of 2048 characters

I am trying to migrate a Play 2.5 version to 2.6.2. I keep getting the URI-length exceeds error. Anyone knows how to override this?
I tried below Akka setting but still no luck.
play.server.akka{
http.server.parsing.max-uri-length = infinite
http.client.parsing.max-uri-length = infinite
http.host-connection-pool.client.parsing.max-uri-length = infinite
http.max-uri-length = infinite
max-uri-length = infinite
}
Simply add
akka.http {
parsing {
max-uri-length = 16k
}
}
to your application.conf. The prefix play.server is only used for a small subset of convenience features for Akka-HTTP integration into the Playframework, e.g. play.server.akka.requestTimeout. Those are documented in the Configuring the Akka HTTP server backend documentation.
I was getting error due to header length exceeding default 8 KB(8192). Added the following to build.sbt and it worked for me :D
javaOptions += "-Dakka.http.parsing.max-header-value-length=16k"
You can try similar for uri length if other options don't work
This took me way to long to figure out. It is somehow NOT to be found in the documentation.
Here is a snippet (confirmed working with play 2.8) to put in your application.conf which is also configurable via an environment variable and works for BOTH dev and prod mode:
# Dev Mode
play.akka.dev-mode.akka.http.parsing.max-uri-length = 16384
play.akka.dev-mode.akka.http.parsing.max-uri-length = ${?PLAY_MAX_URI_LENGTH}
# Prod Mode
akka.http.parsing.max-uri-length = 16384
akka.http.parsing.max-uri-length = ${?PLAY_MAX_URI_LENGTH}
You can then edit the config or with an already deployed application just set PLAY_MAX_URI_LENGTH and it is dynamically configurable without the need to modify commandline arguments.
env PLAY_MAX_URI_LENGTH=16384 sbt run
If anyone getting this type of error in chrome browser when trying to access a site or login. [HTTP header value exceeds the configured limit of 8192 characters]
, Go to chrome
settings -> Security and Privacy -> Site Settings , View Permission and data stored across sites
Search for the specific website and on that site do Clear all data.

How to change Jenkins/Jetty max header size

running a Jenkins server with the embedded Jetty, I get errors regarding too big headers in the Jenkins log:
Feb 15, 2017 3:18:15 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: header full: java.lang.ArrayIndexOutOfBoundsException: 8192
I'd like to increase the Jetty max header size but can't find how to do it, in the case of a Jenkins... I can't find any Jetty config file and don't know if I can set the limit on the Jenkins command line (and what would be the name of the variable to define).
How to achieve this?
If using the built-in Jetty found in the self-running jenkins.war, you cannot adjust that value.
You can only adjust the maximum number of parameters.
--maxParamCount=N = set the max number of parameters allowed in a form submission to protect
against hash DoS attack (oCERT #2011-003). Default is 10000.
Either deploy the war to a full blown container which you can then adjust the value, or change how you use Jenkins to not send excessive URI or HTTP headers (such as using POST vs GET).
To adjust the Jetty 9 header buffer maximum size, you'd adjust the requestHeaderSize in the HttpConfiguration for the ServerConnector that you want that new setting to exist in.
Add this parameter to jenkins config:
JENKINS_ARGS="--requestHeaderSize=258140"

Media Temple php.ini saving

So I am working on my client's website and in order to integrate twitter posts into the website I need to include the following line in PHP.ini:
allow_url_fopen = On;
So now my PHP.ini looks like this:
; Rename this file to php.ini and uncomment or add directives.
; For a complete list of valid directives, visit:
; http://us2.php.net/manual/en/ini.php
[PHP]
; We highly recommend that you leave this options enabled
cgi.fix_pathinfo=1
; Increase maximum post size
;post_max_size = 20M
; Increase execution time
;max_execution_time = 300
; pull in EGPCS [Environment, GET, POST, Cookie, Server] variables as globals
;register_globals = true
; For performance reasons, (mt) does not load all of the modules that are available
; into PHP. You may uncomment any one of the following "extension" lines to enable
; the desired module
; Salblotron XSLT
;extension=xslt.so
; save in local tmp
session.save_path=/home/65994/data/tmp
allow_url_fopen = On;
upload_max_filesize = 20M
For some reason it works... but only for about 15 mins or so before it breaks and comes up with an error.
Nevertheless if I take the line added to php.ini and move it around... and resave, it works again...
ODD...
Does anyone know why or how to fix this?
MT disables insecure php functions by default now, so there's a good chance that your issue may be due to something causing a timeout even though you've re-enabled the 'offensive' option. Try setting the
default_socket_timeout
option to something longer http://php.net/manual/en/filesystem.configuration.php
As an aside, you'll probably save yourself some grief if you switch to cURL with Twitter OAuth instead of direct url open.

Resources