Why suddenly, localhost runs slowly? - reactjs

All of the sudden, when I use npm start on any of my projects, it just keeps loading them.
Any idea why did it happen? Didn't happen to me before, just now.
I'm working only with React.

I had the same problem with PHP. I solved it by changing "localhost" to "127.0.0.1" in database connection parameters like someone suggested here: https://serverfault.com/a/444338/62739 . I think it may work for you too, give it a try.

The reason I suggested using the raw IP address for localhost is because Windows does not directly support the type of connection that MySQL/MariaDB tries to use when localhost is specified. This will result in delays of up to several seconds on every page load.

Related

'clarinet integrate' quickly fails and nothing is logged to console?

Following https://docs.hiro.so/smart-contracts/devnet I can't get the command clarinet integrate to work. I have installed Docker on my mac and am running version 0.28.0 of clarinet. Running command within 'my-react-app/clarinet' where all clarity related files live (contracts, settings, tests, and Clarinet.toml).
My guess is it could be an issue with Docker?
The issue was that I downloaded my Devnet.toml file from a repo that was configured incorrectly. The configuration I needed was:
[network]
name = "devnet"
I increased the CPU and Memory in Docker as well.
There is an issue when the command attempts to spin up the stacks explorer, but I was informed that there are several existing issues with the stacks explorer from clarinet integrate at the moment.
Depending on how the last devnet was terminated, you could have some containers running. This issue should be fixed in the next incoming release, meanwhile, you'd need to terminate this stale containers manually.
Apart from Ludo's suggestions, I'd also look into your Docker resources. The default CPU/memory allocation should allow you to get started with Clarinet, but just in case, you could alter it to see if that makes a difference. Here's my settings for your reference:
Alternatively, to tease things out, you could reuse one of the samples (eg: hirosystems/stacks-billboard) instead of running your project. See if the sample comes up as expected; if it does, there could be something missing in your project.

Localhost windows10 took to loong to respond

Hi I'm Surya I'm facing this localhost took to long to respond in my windows computer I thought the problem was with react and again it happened in the expo so it is a problem in my computer
enter image description here
enter image description here
it also compiled successfully I tried disabling my firewall and my antivirus(Quick Heal) and my antivirus is not yet expired everything is good but I do no what is the problem please help me with this problem .
The issue is mostly caused by firewall or antivirus. Re assure that you have disabled antivirus software and firewall. Also, check the network connection and ensure that you are not connected to proxy.
After performing all these, try restarting the system.
I finally solved it the problem was with my antivirus I added localhost to be allowed in my quick heal antivirus now everything is good.
Again the problem started this weird I do no why I ran Windows troubleshooter it gave me this error
the remote device won't accept the connection localhost

Parse4cn1 connection error

I'm facing trouble using parse4cn1 because apparently I have a connection issue with the server(back4app). I was working with parse4cn1 for quite some time and everything went fine until yesterday. Right now I am getting a ParseException when using it -
[parse4cn1] Request failed.
ParseException [code=100, msg=Connection to backend failed., cause=null]
**The project runs perfectly on a different pc. tried to use another network on this computer and still get the same connection issue.
It must be my computer blocking me from using this particular server. unfortunately I do not know how to check if this is true and obviously how to fix it..(am using netbeans if it matters..)
help would be apreciated!
Itay
Eventually the issue was in my codename1 simulator, apparently the default behavior of it is blocking all outgoing network connections (or at least that how it was for me). I had to simply change it to regular network activity.

Why are file extensions case-sensitive on the web but not on localhost?

So I was trying to link an image on my website as <img src="cat.png" alt="cat"/> and for some reason it wasn't working. I later found out that when uploaded to my server the file was labeled as "cat.PNG" so I inputted that and it fixed. However, when I was testing my site on localhost, it was fine. Why is this? Is this some security issue or is localhost just smarter when it comes to parsing files?
I know this is a weird and random question but I am curious. Thanks.
That depends on the operating system. Your server seems to run Linux which is normally case sensitive and if you run Windows on localhost it's not.

Silverlight not searching for ClientAccessPolicy.xml

I'm working with Silverlight and WebSocket4Net and get an error when attempting to connect. The problem is with the underlying socket:
{System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions.}
There is no InnerException or StackTrace below this.
It does not try to find the ClientAccessPolicy.xml -- at all.
I'm trying to connect to another computer, say 10.0.0.102, and that I'm from 10.0.0.101. I can access 10.0.0.102/ClientAccessPolicy.xml just fine. However, in Fiddler, it doesn't even attempt to load 10.0.0.102/ClientAccessPolicy -- no call is made to find it.
Because of this, my attempt to call and connect to the WebSocket via TCP doesn't work at all (i.e. ws://10.0.0.102:4530/WebSockOutput/). I've manually set the Socket's ClientAccessPolicyProtocol to Http... When I check at the lower layers, it's still setting the CAPP correctly.
Any thoughts?
I'd also like to add that I've rebooted and cleared the Temp directory on both machines several times.
OK, so the problem is REALLY REALLY REALLY sad, on my part.
Apparently it already cached the ClientAccessPolicy.xml (which I'd changed to support the TCP Ports), and though I thought I was killing the temporary internet files, I wasn't. I deleted my history/downloaded data from IE's Options, and that fixed everything.
One would think that Silverlight would attempt to re-download the ClientAccessPolicy a bit more frequently...

Resources