Why does aliyun OSS set the upload file size, but it still has the problem of exceeding the file size - alibaba-cloud-oss

application.yml configure
Error information
Nginx is also configured to upload files with a size of 50m,But more than 1M images, will upload failure, why?Help me? thanks

Please have a try:
Before Spring Boot 2.0:
spring.http.multipart.max-file-size=50MB
spring.http.multipart.max-request-size=50MB
After Spring Boot 2.0:
spring.servlet.multipart.max-file-size=50MB
spring.servlet.multipart.max-request-size=50MB

Related

Max size of a fat JAR for Apache Flink

I've build an Apache Flink app and packaged it in a fat JAR with Gradle Shadow Plugin. The resulting file size is ~114 MiB. When I'm trying to upload it with Flink's web UI it is stuck in "Saving…" phase. And if I use curl to upload it manually the result is "413 Request Entity Too Large":
$ curl -X POST -H "Expect:" -i -F "jarfile=#flink-all.jar" http://ec2-18-204-247-166.compute-1.amazonaws.com:8081/jars/upload
HTTP/1.1 413 Request Entity Too Large
content-length: 0
What are the options, then?
UPD: I can see the JAR in /tmp/flink-web-UUID/flink-web-upload/UUID/flink-all.jar but it is not recognized by Flink (not visible on UI).
Ok, it was easy to fix.
First, I've scanned their repo for "Too Large" string and found this class. Looks like SERVER_MAX_CONTENT_LENGTH is responsible for max object size. It is set here from the configuration option rest.server.max-content-length. The default is 100 MiB.
TLDR:
Setting rest.server.max-content-length in flink-conf.yaml to 209715200 (200 MiB) solved the issue.

Apache2 configuration issue - Avoid file accessing without extension

I'm developing a website and having development environment as Ubuntu 14.04, PHP 5.5.9, Apache 2.4.7. My issue is if some want accessing a file like http://domain.com/robots(without extension) then I should avoid but I've to allow if some tries to access http://domain.com/robots.txt(with extension).
Now in both ways I'm able to access files, I want to avoid this when user haven't given extension of the file using .htaccess or apache configuration file.
My previous environment was Apache 2.2 and PHP 5.3.10 at the time with default Apache configuration it was working as expected but after upgrade its not working as expected and due lack of knowledge on Apache configuration I'm unable to pick those lines of code.
Add following line in .htaccess
Options -Multiviews

Appengine LocalResourceFileServlet no file found for:

I'm using some in-house tool to upload a config file. But I get the following error:
Jan 10, 2013 11:18:58 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /content/xxx.xml
Where xxx.xml is the file that I've uploaded. Any hints as to what this erorr means? The class LocalResourceFileServlet does not even seem to be present with my vesion of appengine. My hunch is telling me to edit web.xml but I'm not sure...
Any help/hints would be appreciated.
GAE has a read-only filesystem. So you can not upload a file to appengine and then access it via a direct url. You can only access files that were uploaded as part of the project upload.
However, you can upload file to GAE Blobstore and then access ti via your own handler - see Blobstore docs for examples.

Server giving 404 not found

I am deploying a spring application which contains files with around 100000 entries. Each row in the file has about 23 chars.
The app deploys fine when a file has 100000 entries but when I increase the contents to 400000 entries, when I access my app url I get a 404 Not found error.
I need to figure out what causes the crash ( whether a memory problem or something else ) but I do not see anything erroneous in the tomcat log files, using the command vmc files [app_name] tomcat/logs/catalina.... just info messages related to server startup.
Are there other options to debug the issue?
Thanks,
Cristian
I would look into what Dan has mentioned! Also can you look at the logs folder to see if the files there give more information.
vmc logs <app-name>
or
vmc files <app-name> logs/stderr.log
vmc files <app-name> logs/stdout.log
Okay, the application was using too much memory, as a result the Java processes was being destroyed causing the router to return a 404 when trying to route to the application.

NoClassDefFoundError MimeTypeException with PDF extraction

I am getting an exception trying to use update/extract with PDF files
My Set up is:-
Ubuntu Server 11.10
Tomcat 6
Solr 3.5.0.2011.11.22.15.54.38
I can browse to solr/admin OK
I have put all the contrib/extract and apache-solr-cell3.5.0.jar libraries into the tomcat folder webapps/solr/WEB-INF/lib
I am calling extract using:-
curl "http://localhost:8080/solr/update/extract?uprefix=attr_&fmap.content=attr_content&commit=true" -F "file=/path/to/my.pdf"
error is
java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:383)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:461)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHandler(RequestHandlers.java:248)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:239)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
Would appreciate any pointers - the only time this error seems to come up elsewhere is with Nutch and cached results.
I have tried sending the mimetype in the querystring and also a *.doc file but got the same error.
According to the error message it is not a MimeTypeException exception you get: The problem is a NoClassDefFoundError, because Solr cannot load the class MimeTypeException.
Normally this class is present in tika-core.jar.
Make sure you actually have that file and also check if you have a lib statement in your solrconfig.xml pointing to the right directory.
This was due to the basic error of copying the necessary tika libraries (to tomcat6/webapps/solr/WEB-INF/lib) but leaving ownership of the jar files as ROOT instead of chown-ing them to TOMCAT6. After setting the right permission and restarting Tomcat it started working OK
Found the solution of this problem, I was using SolrJ to update my pdf indexing.
after deploy solr to tomcat, I didn't include the following libraries into the tomcat/webapp
and I get all the lazy loading problem, etc etc
I even try to get apache tika...
until I do this...
shutdown tomcat
\apache-solr-3.5.0\contrib\extraction
copy the libraries above to below
\apache-tomcat-7.0.26\webapps\solr\WEB-INF\lib
startup tomcat
cheers

Resources