Slow access to Django’s request.body

Sometimes this line of Django app (hosted using Apache/mod_wsgi) takes a lot of time to execute (eg. 99% of eg. 6 seconds of request handling, as measured by New Relic), when submitted by some mobile clients:

raw_body = request.body

(where request is an incoming request)

The questions I have:

  1. What could have slowed down access to request.body so much?
  2. What would be the correct configuration for Apache to wait before invoking Django until client sends whole payload? Maybe the problem is in Apache configuration.

Django's body attribute in HttpRequest is a property, so that really resolves on what is really being done there and how to make it happen outside of the Django app, if possible. I want Apache to wait for full request before sending it to Django app.

Apache Camel: maven-remote-resources-plugin (goal "process") is ignored by m2e

I am working on a Camel Project. I began with taking a camel example, run "mvn eclipse:eclipse" in the shell and then imported it as a maven project into Eclipse. Unfortunately, I have a warning in the pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.camel</groupId>
        <artifactId>examples</artifactId>
        <version>2.13.0</version>
    </parent>

    <artifactId>CruiserFoodSupply</artifactId>
    <packaging>jar</packaging>
    <name>Cruiser Food Supply</name>
    <description>A process on how food supply on a cruiser works.</description>

    <dependencies>

        <!-- Camel dependencies -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jms</artifactId>
        </dependency>
        <!-- Mail -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mail</artifactId>
        </dependency>
        <!-- XStream -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xstream</artifactId>
        </dependency>
        <!-- Weather -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-weather</artifactId>
        </dependency>
        <!-- Many more dependencies-->

    </dependencies>


    <profiles>
        <profile>
            <id>Example</id>
            <properties>
                <target.main.class>org.apache.camel.example.jmstofile.CamelJmsToFileExample</target.main.class>
            </properties>
        </profile>
    </profiles>

    <build>
        <plugins>
            <!-- Allows the example to be run via 'mvn compile exec:java' -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <configuration>
                    <mainClass>${target.main.class}</mainClass>
                    <includePluginDependencies>false</includePluginDependencies>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

Eclipse shows a warning in the line where it says <parent> and the warning is:

maven-remote-resources-plugin (goal "process") is ignored by m2e.

How to get rid of this warning?

.htaccess does not redirect

I am creating a MVC structure for my php web application. It's a Windows 8.1 system, running xampp. The .htaccess file does not work correctly. It is located here:

C:\xampp\htdocs\hmb

When I open this url in firefox:

http://localhost/hmb/test

I want this to be processed:

http://localhost/hmb/index.php?url=page

But I get an error (404).

This is my .htaccess files content:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

$_GET['url'] in index.php just does not exist. I configured the httpd.conf file. What am I doing wrong?

Failed to set up HTTPS on WAMPSERVER 2.5

I am using WAMPSERVER (64 BITS & PHP 5.5) 2.5, and I need to set up HTTPS for my websites, so I have followed the instruction from the links below,

http://developersdigest.blogspot.co.uk/2012/03/wamp-server-2-https-ssl-configuration.html

and have also tried this one,

http://indiesphp.com/setup-httpsssl-on-wamp-server/

In the DOS Command windows, I enter httpd -t . it displays Syntax is OK.

But it says Unable to connect on my firefox when I hit https://{{localhost}}/

Any idea what I missed?

Apache poi XWPF Paragraph line spacing

I am looking at trying to build a word document using Apache Poi in Java/Coldfusion. So far it's letting me do a lot of the formatting I want except for line spacing of a paragraph. Does anyone know how I would set a paragraph to be single line spaced? It keeps building documents that have Multiple spaced paragraphs, with 1.15 as the spacing.

Here's an example of the code:

document = loader.create("org.apache.poi.xwpf.usermodel.XWPFDocument");
ParagraphAlignment = loader.create("org.apache.poi.xwpf.usermodel.ParagraphAlignment" );
paragraphOne = document.createParagraph();
paragraphOne.setAlignment(ParagraphAlignment.CENTER);

paragraphOneRunOne = paragraphVar.createRun();
paragraphOneRunOne.setFontFamily('Cambria');
paragraphOneRunOne.setFontSize(12);
paragraphOneRunOne.setBold(false);
paragraphOneRunOne.setText(Here's one line of text in this paragraph);
paragraphOneRunOne.addBreak();

paragraphOneRunTwo = paragraphVar.createRun();
paragraphOneRunTwo.setFontFamily('Cambria');
paragraphOneRunTwo.setFontSize(12);
paragraphOneRunTwo.setBold(false);
paragraphOneRunTwo.setText(Here's a second line of text in this paragraph);
paragraphOneRunTwo.addBreak();

I've looked through examples and the api docs, and the only settings I can find for line spacing determine the line spacing before or after a paragraph, not within the paragraph for linespacing of the text.

Anyone encounter this before or have any exmaples of how to fix it?

How to change Port 8080 on Apache Tomcat on Linux Centos 6.5 sever to the Default?

I want to remove switch from port 8080 on my Apache Tomcat on Linux server CentOS 6.5 to the default. On My hosted Apache Tomcat server is running on port 8080 on url vmx15978.hosting24.com.au:8080. After I have installed the Geoserver software on the Apache server the url for it is http://vmx15978.hosting24.com.au:8080/geoserver/web/.

My website domain is links-map.com. Currently I can access Geoserver by this URL: links-map.com:8080/geoserver/web; However, I want to access Geoserver without 8080 using this URL instead: http://links-map.com/geoserver/web/

How can I do this?

Please help me.

Wamp remove localhost from URL

My Wamp installed fine, and both apache and mysql services are ok too.

But when I'm on Localhost page within Wamp, after I click on one of my web projects (www folder) it don't load properly.

For example.

URL: http://localhost/

The page shows me all the regular stuff from Wamp. Under "Your Projects", i have a -Hello World- site.

If I click the project, I have a sorry page that tells me that it cannot be finded.

URL: http://helloworld/

BUT if I WRITE on adress field URL: http://localhost/helloworld/

The project RUNS!!!

Can you help me fix that???

My Host file, already has 127.0.0.1 localhost

The following artifacts could not be resolved: org.apache.hbase:hbase:jar:0.96.1.1-hadoop2

I try to take the following steps: right click on pom.xml and run as maven install in eclipse but I got this error:

[ERROR] Failed to execute goal on project tt: Could not resolve dependencies for project com.sunshineatnoon:tt:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.apache.hbase:hbase:jar:0.96.1.1-hadoop2, com.yahoo.ycsb:core:jar:0.1.4: Failure to find org.apache.hbase:hbase:jar:0.96.1.1-hadoop2 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

however, when I looked into http://repo.maven.apache.org/maven2, there indeed exists this org.apache.hbase:hbase:jar:0.96.1.1-hadoop2.

My pom.xml is as follows:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.sunshineatnoon</groupId>
  <artifactId>tt</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <dependencies>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase</artifactId>
      <version>0.96.1.1-hadoop2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>2.2.0</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>0.1.4</version>
    </dependency>
  </dependencies>

</project>

How can I solve this problem?Any help will be appreciated, thanks in advance!

.htaccess file ineffective at password protecting my xampp directory?

I'm totally new to XAMPP and I'm trying to set up the security for it as best as possible. I understand that it is beneficial to create an .htaccess file to password protect certain directories. There is a page/script that is built into xampp available at http://localhost/security/xamppsecurity.php that will generate one for you in the /htdocs/xampp directory. However, after I've gone and done this, I'm still not prompted for a password when I visit my site at http://localhost/xampp. I thought I should've been prompted for a username and password here? This is a difficult problem to search answers for so I apologize if this has been answered already.

I've made sure to close/re-open my browser and delete all history/cache/cookies. I also restarted the Apache service after creating the htaccess file.

the .htaccess file:

AuthName "xampp user"
AuthType Basic
AuthUserFile "C:\xampp\security\xampp.users"
require valid-user

C:\xampp\security\xampp.users is a valid file and it contains the username I setup and an encrypted password.